syntax change

This commit is contained in:
James Griffith 2020-10-13 15:53:27 -04:00 committed by Megan Marsh
parent f86f7c4464
commit c86a48fbc9
1 changed files with 2 additions and 1 deletions

View File

@ -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)