From e6bf7e7df9939efb05b0349a87c163540fe08dd9 Mon Sep 17 00:00:00 2001 From: Vaclav Pavlin Date: Fri, 28 Jun 2024 13:50:02 +0200 Subject: [PATCH] fix(status-cli)_: exit on sigint, actualyl print error log on failure (#5398) --- cmd/status-cli/main.go | 3 ++- cmd/status-cli/simulate.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/status-cli/main.go b/cmd/status-cli/main.go index f094031fd..83e04d1b8 100644 --- a/cmd/status-cli/main.go +++ b/cmd/status-cli/main.go @@ -1,6 +1,7 @@ package main import ( + "log" "os" "time" @@ -168,6 +169,6 @@ func main() { } if err := app.Run(os.Args); err != nil { - zap.L().Fatal("main", zap.Error(err)) + log.Fatal(err) } } diff --git a/cmd/status-cli/simulate.go b/cmd/status-cli/simulate.go index d7f703888..95da635cc 100644 --- a/cmd/status-cli/simulate.go +++ b/cmd/status-cli/simulate.go @@ -21,6 +21,8 @@ func simulate(cCtx *cli.Context) error { signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM) <-sig cancel() + time.Sleep(1 * time.Second) + os.Exit(1) }() logger, err := getSLogger(cCtx.Bool(DebugLevel))