packer/plugin: Interrupted() to check for i nterrupts
This commit is contained in:
parent
dbae49f0c8
commit
dfb44a2abe
@ -177,3 +177,8 @@ func ServeProvisioner(p packer.Provisioner) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tests whether or not the plugin was interrupted or not.
|
||||||
|
func Interrupted() bool {
|
||||||
|
return atomic.LoadInt32(&Interrupts) > 0
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user