Skip to content

Commit

Permalink
utmctl: remove Export command because it cannot work in sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Nov 21, 2024
1 parent 4c14814 commit 6093498
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
1 change: 0 additions & 1 deletion Scripting/UTM.sdef
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@

<command name="export" code="coreexpo" description="Export a virtual machine to a specified location.">
<cocoa class="UTMScriptingExportCommand"/>
<access-group identifier="*"/>
<direct-parameter type="virtual machine" requires-access="r" description="The virtual machine to export."/>
<parameter name="to" code="efil" type="file" description="Location to export the VM to.">
<cocoa key="file"/>
Expand Down
22 changes: 0 additions & 22 deletions utmctl/UTMCtl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ struct UTMCtl: ParsableCommand {
IPAddress.self,
Clone.self,
Delete.self,
Export.self,
USB.self
]
)
Expand Down Expand Up @@ -523,27 +522,6 @@ extension UTMCtl {
}
}

extension UTMCtl {
struct Export: UTMAPICommand {
static var configuration = CommandConfiguration(
abstract: "Export a virtual machine and all its data to a specified location."
)

@OptionGroup var environment: EnvironmentOptions

@OptionGroup var identifer: VMIdentifier

@Option var path: String

func run(with application: UTMScriptingApplication) throws {
let vm = try virtualMachine(forIdentifier: identifer, in: application)
// TODO: Make sure the URL is writable as required by data.export
let exportUrl = URL(fileURLWithPath: path)
vm.exportTo!(exportUrl)
}
}
}

extension UTMCtl {
struct USB: ParsableCommand {
static var configuration = CommandConfiguration(
Expand Down

0 comments on commit 6093498

Please sign in to comment.