Merge pull request #338 from mitchellh/signal-confirm
main: confirm cleanup at first signal received
This commit is contained in:
commit
09f01d44e4
|
@ -20,6 +20,8 @@ func setupSignalHandlers(env packer.Environment) {
|
||||||
<-ch
|
<-ch
|
||||||
log.Println("First interrupt. Ignoring to allow plugins to clean up.")
|
log.Println("First interrupt. Ignoring to allow plugins to clean up.")
|
||||||
|
|
||||||
|
env.Ui().Error("Interrupt signal received. Cleaning up...")
|
||||||
|
|
||||||
// Second interrupt. Go down hard.
|
// Second interrupt. Go down hard.
|
||||||
<-ch
|
<-ch
|
||||||
log.Println("Second interrupt. Exiting now.")
|
log.Println("Second interrupt. Exiting now.")
|
||||||
|
|
Loading…
Reference in New Issue