mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-11 01:30:06 -04:00
packer/plugin: Implement Builder.Cancel
This commit is contained in:
parent
e06c26c55c
commit
0ba80c88e8
1 changed files with 6 additions and 0 deletions
|
|
@ -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 a new issue