Check base command close for error and modify exitcode
This commit is contained in:
parent
c999147497
commit
d5e41e328e
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user