diff --git a/packer.go b/packer.go index d63eeb0e5..c4faaf9ae 100644 --- a/packer.go +++ b/packer.go @@ -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) }