packer: Handle errors with executing the CLI
This commit is contained in:
parent
c5e83a4b15
commit
6633f3df80
|
@ -50,7 +50,12 @@ func main() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
exitCode, _ := env.Cli(os.Args[1:])
|
exitCode, err := env.Cli(os.Args[1:])
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error executing CLI: %s\n", err.Error())
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
plugin.CleanupClients()
|
plugin.CleanupClients()
|
||||||
os.Exit(exitCode)
|
os.Exit(exitCode)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue