Commit daf076bb authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: Implement cancel

parent bc670323
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"log"
) )
const BuilderId = "mitchellh.vmware" const BuilderId = "mitchellh.vmware"
...@@ -68,4 +69,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact { ...@@ -68,4 +69,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact {
} }
func (b *Builder) Cancel() { func (b *Builder) Cancel() {
if b.runner != nil {
log.Println("Cancelling the step runner...")
b.runner.Cancel()
}
} }
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