From 833c162187977db1a18098ca9d6af93113708774 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Fri, 11 Nov 2022 23:20:21 +0400 Subject: [PATCH] tart stop: return a different exit code when VM is not running (#321) See https://github.com/cirruslabs/tart/pull/316#issuecomment-1311556674. --- Sources/tart/Commands/Stop.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/tart/Commands/Stop.swift b/Sources/tart/Commands/Stop.swift index a93fca7..5f5b8b3 100644 --- a/Sources/tart/Commands/Stop.swift +++ b/Sources/tart/Commands/Stop.swift @@ -22,7 +22,7 @@ struct Stop: AsyncParsableCommand { if pid == 0 { print("VM \(name) is not running") - Foundation.exit(1) + Foundation.exit(2) } // Try to gracefully terminate the VM