Skip to content

Commit 6093498

Browse files
committed
utmctl: remove Export command because it cannot work in sandbox
1 parent 4c14814 commit 6093498

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

Scripting/UTM.sdef

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105

106106
<command name="export" code="coreexpo" description="Export a virtual machine to a specified location.">
107107
<cocoa class="UTMScriptingExportCommand"/>
108-
<access-group identifier="*"/>
109108
<direct-parameter type="virtual machine" requires-access="r" description="The virtual machine to export."/>
110109
<parameter name="to" code="efil" type="file" description="Location to export the VM to.">
111110
<cocoa key="file"/>

utmctl/UTMCtl.swift

-22
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ struct UTMCtl: ParsableCommand {
3636
IPAddress.self,
3737
Clone.self,
3838
Delete.self,
39-
Export.self,
4039
USB.self
4140
]
4241
)
@@ -523,27 +522,6 @@ extension UTMCtl {
523522
}
524523
}
525524

526-
extension UTMCtl {
527-
struct Export: UTMAPICommand {
528-
static var configuration = CommandConfiguration(
529-
abstract: "Export a virtual machine and all its data to a specified location."
530-
)
531-
532-
@OptionGroup var environment: EnvironmentOptions
533-
534-
@OptionGroup var identifer: VMIdentifier
535-
536-
@Option var path: String
537-
538-
func run(with application: UTMScriptingApplication) throws {
539-
let vm = try virtualMachine(forIdentifier: identifer, in: application)
540-
// TODO: Make sure the URL is writable as required by data.export
541-
let exportUrl = URL(fileURLWithPath: path)
542-
vm.exportTo!(exportUrl)
543-
}
544-
}
545-
}
546-
547525
extension UTMCtl {
548526
struct USB: ParsableCommand {
549527
static var configuration = CommandConfiguration(

0 commit comments

Comments
 (0)