Merge pull request #338 from mitchellh/signal-confirm

main: confirm cleanup at first signal received
This commit is contained in:
Mitchell Hashimoto 2013-08-24 17:13:25 -07:00
commit 09f01d44e4
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@ func setupSignalHandlers(env packer.Environment) {
<-ch
log.Println("First interrupt. Ignoring to allow plugins to clean up.")
env.Ui().Error("Interrupt signal received. Cleaning up...")
// Second interrupt. Go down hard.
<-ch
log.Println("Second interrupt. Exiting now.")