cli: should return non-zero code for error (#3469)
This commit is contained in:
parent
35edc2bcc3
commit
ab5c623ac7
@ -71,7 +71,10 @@ func Exec(cmd *cobra.Command) {
|
||||
|
||||
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
|
||||
cleanup(cmd)
|
||||
_ = cmd.Execute()
|
||||
err = cmd.Execute()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// Ctx returns the appropriate context.Context for ExecuteWithConfig commands
|
||||
|
Loading…
Reference in New Issue
Block a user