From 93ba19a1fa626ce5d99124f661b8480933f7df2a Mon Sep 17 00:00:00 2001 From: Adphi Date: Wed, 1 Mar 2023 13:30:25 +0100 Subject: [PATCH] fix execution exit code on error Signed-off-by: Adphi --- cmd/d2vm/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/d2vm/main.go b/cmd/d2vm/main.go index 2ede3d9..19a9809 100644 --- a/cmd/d2vm/main.go +++ b/cmd/d2vm/main.go @@ -75,7 +75,9 @@ func main() { fmt.Println() cancel() }() - rootCmd.ExecuteContext(ctx) + if err := rootCmd.ExecuteContext(ctx); err != nil { + logrus.Fatal(err) + } } func init() {