fix: added os.Exit in commands with error

This commit is contained in:
David Allen 2024-12-17 16:28:13 -07:00
parent 2b9e3d66d2
commit 4ff8094988
Signed by: towk
GPG key ID: 793B2924A49B3A3F
2 changed files with 2 additions and 0 deletions

View file

@ -37,6 +37,7 @@ var serveCmd = &cobra.Command{
b, err := json.MarshalIndent(conf, "", "\t")
if err != nil {
log.Error().Err(err).Msg("failed to marshal config")
os.Exit(1)
}
fmt.Printf("%v\n", string(b))
}