Commit 0ba80c88 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/plugin: Implement Builder.Cancel

parent e06c26c5
......@@ -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()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment