From cf4a19a30444ad01863de157a0c9140088dad1c7 Mon Sep 17 00:00:00 2001 From: John T Skarbek Date: Tue, 3 Nov 2015 12:43:42 -0500 Subject: [PATCH] vmware-iso-builder: Corrects logic checking destroy * I suspect the logic written for checking if the vm has been destroyed is incorrect. The test will come back from the esx server indicating that the vm is gone as it should, but the logic I believe is reversed so we never hit the break in the if statement * Feedback is MORE than welcome --- builder/vmware/iso/step_register.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/vmware/iso/step_register.go b/builder/vmware/iso/step_register.go index f4c5d776d..96528ee5c 100644 --- a/builder/vmware/iso/step_register.go +++ b/builder/vmware/iso/step_register.go @@ -57,8 +57,8 @@ func (s *StepRegister) Cleanup(state multistep.StateBag) { } // Wait for the machine to actually destroy for { - exists, _ := remoteDriver.IsDestroyed() - if !exists { + destroyed, _ := remoteDriver.IsDestroyed() + if destroyed { break } time.Sleep(150 * time.Millisecond)