From c544c9406c3a97ec0bf6c902c679e4119e46c9d2 Mon Sep 17 00:00:00 2001 From: Mathis Maquenne <124215603+mathismqn@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:34:41 +0200 Subject: [PATCH] fix: exit with a non-zero status when a command fails --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 23b8053..1aceb72 100644 --- a/main.go +++ b/main.go @@ -12,5 +12,8 @@ func main() { ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) defer stop() - cmd.RootCmd.ExecuteContext(ctx) + if err := cmd.RootCmd.ExecuteContext(ctx); err != nil { + stop() + os.Exit(1) + } }