From e90d53eceb39188f51d4a97167025539b2986426 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Tue, 27 Sep 2022 18:30:44 +0400 Subject: [PATCH] tart delete: allow removing multiple VMs at once (#257) --- Sources/tart/Commands/Delete.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/tart/Commands/Delete.swift b/Sources/tart/Commands/Delete.swift index 70337b6..8f1e00c 100644 --- a/Sources/tart/Commands/Delete.swift +++ b/Sources/tart/Commands/Delete.swift @@ -6,11 +6,13 @@ struct Delete: AsyncParsableCommand { static var configuration = CommandConfiguration(abstract: "Delete a VM") @Argument(help: "VM name") - var name: String + var name: [String] func run() async throws { do { - try VMStorageHelper.delete(name) + for it in name { + try VMStorageHelper.delete(it) + } Foundation.exit(0) } catch {