From daf076bbd9e8282d045bd97fbad8354b4a146d6d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 5 Jun 2013 17:52:37 -0700 Subject: [PATCH] builder/vmware: Implement cancel --- builder/vmware/builder.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builder/vmware/builder.go b/builder/vmware/builder.go index c3ebac9ef..4d4c3ac4e 100644 --- a/builder/vmware/builder.go +++ b/builder/vmware/builder.go @@ -4,6 +4,7 @@ import ( "github.com/mitchellh/mapstructure" "github.com/mitchellh/multistep" "github.com/mitchellh/packer/packer" + "log" ) const BuilderId = "mitchellh.vmware" @@ -68,4 +69,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact { } func (b *Builder) Cancel() { + if b.runner != nil { + log.Println("Cancelling the step runner...") + b.runner.Cancel() + } }