packer/plugin: Interrupted() to check for i nterrupts

This commit is contained in:
Mitchell Hashimoto 2013-08-30 16:39:28 -07:00
parent dbae49f0c8
commit dfb44a2abe

View File

@ -177,3 +177,8 @@ func ServeProvisioner(p packer.Provisioner) {
os.Exit(1)
}
}
// Tests whether or not the plugin was interrupted or not.
func Interrupted() bool {
return atomic.LoadInt32(&Interrupts) > 0
}