From 7bf7f890c401a3bb9bcc0327e3b5765834f99b88 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Thu, 21 Jul 2022 14:53:47 +0300 Subject: [PATCH] tart run: return exit status 2 when VM is already running (#155) --- Sources/tart/Commands/Run.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/tart/Commands/Run.swift b/Sources/tart/Commands/Run.swift index 4e26c62..b71c39a 100644 --- a/Sources/tart/Commands/Run.swift +++ b/Sources/tart/Commands/Run.swift @@ -81,10 +81,10 @@ struct Run: AsyncParsableCommand { } catch { if error.localizedDescription.contains("Failed to lock auxiliary storage.") { print("Virtual machine \"\(name)\" is already running!") - } else { - print(error) + Foundation.exit(2) } + print(error) Foundation.exit(1) } }