Check base command close for error and modify exitcode

This commit is contained in:
Chris Roberts 2022-07-25 14:28:53 -07:00
parent c999147497
commit d5e41e328e

View File

@ -88,7 +88,6 @@ func Main(args []string) int {
if err != nil {
panic(err)
}
defer base.Close()
// Build the CLI
cli := &cli.CLI{
@ -111,6 +110,14 @@ func Main(args []string) int {
panic(err)
}
err = base.Close()
if err != nil {
log.Error("failure encountered while closing command",
"error", err,
)
exitCode = -1
}
return exitCode
}