packer/plugin: Implement Builder.Cancel
This commit is contained in:
parent
e06c26c55c
commit
0ba80c88e8
|
@ -32,6 +32,12 @@ func (b *cmdBuilder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact {
|
|||
}
|
||||
|
||||
func (b *cmdBuilder) Cancel() {
|
||||
defer func() {
|
||||
r := recover()
|
||||
b.checkExit(r, nil)
|
||||
}()
|
||||
|
||||
b.builder.Cancel()
|
||||
}
|
||||
|
||||
func (c *cmdBuilder) checkExit(p interface{}, cb func()) {
|
||||
|
|
Loading…
Reference in New Issue