Pause between each boot command element rather than each char with -debug

Fixes #4332
This commit is contained in:
DanHam 2016-12-31 11:57:11 +00:00
parent 1560e15632
commit ac769be49a
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 5 additions and 4 deletions

View File

@ -87,10 +87,6 @@ func (s *StepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction
return multistep.ActionHalt
}
if pauseFn != nil {
pauseFn(multistep.DebugLocationAfterRun, fmt.Sprintf("boot_command[%d]: %s", i, command), state)
}
if err := driver.VBoxManage("controlvm", vmName, "keyboardputscancode", code); err != nil {
err := fmt.Errorf("Error sending boot command: %s", err)
state.Put("error", err)
@ -98,6 +94,11 @@ func (s *StepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction
return multistep.ActionHalt
}
}
if pauseFn != nil {
pauseFn(multistep.DebugLocationAfterRun, fmt.Sprintf("boot_command[%d]: %s", i, command), state)
}
}
return multistep.ActionContinue