Commit 6633f3df authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: Handle errors with executing the CLI

parent c5e83a4b
......@@ -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)
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment