packer/plugin: Interrupted() to check for i nterrupts
This commit is contained in:
parent
55b0b586d3
commit
d5c6b9fad3
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue