fix: exit with a non-zero status when a command fails

This commit is contained in:
Mathis Maquenne
2026-07-30 11:29:06 +02:00
parent 0287cfba9c
commit c544c9406c
+4 -1
View File
@@ -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)
}
}