From c86a48fbc955d63b0016ecc201e89b300d78f361 Mon Sep 17 00:00:00 2001 From: James Griffith Date: Tue, 13 Oct 2020 15:53:27 -0400 Subject: [PATCH] syntax change --- builder/vsphere/common/step_shutdown.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/vsphere/common/step_shutdown.go b/builder/vsphere/common/step_shutdown.go index 4eeb38e9c..afb697cfa 100644 --- a/builder/vsphere/common/step_shutdown.go +++ b/builder/vsphere/common/step_shutdown.go @@ -61,7 +61,8 @@ func (s *StepShutdown) Run(ctx context.Context, state multistep.StateBag) multis return multistep.ActionContinue } - if state.Get("communicator") == nil { + comm, _ := state.Get("communicator").(packer.Communicator) + if comm == nil { msg := fmt.Sprintf("Please shutdown virtual machine within %s.", s.Config.Timeout) ui.Message(msg)