fix(status-cli)_: exit on sigint, actualyl print error log on failure (#5398)

This commit is contained in:
Vaclav Pavlin 2024-06-28 13:50:02 +02:00 committed by GitHub
parent 5934233266
commit e6bf7e7df9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -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)
}
}

View File

@ -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))