mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 08:42:33 -04:00
packer: Handle errors with executing the CLI
This commit is contained in:
parent
c5e83a4b15
commit
6633f3df80
1 changed files with 6 additions and 1 deletions
|
|
@ -50,7 +50,12 @@ func main() {
|
|||
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()
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue