Commit e101b031 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/virtualbox: Cancel mid-type if we can

parent 2de0238f
......@@ -59,6 +59,12 @@ func (s *stepTypeBootCommand) Run(state map[string]interface{}) multistep.StepAc
continue
}
// Since typing is sometimes so slow, we check for an interrupt
// in between each character.
if _, ok := state[multistep.StateCancelled]; ok {
return multistep.ActionHalt
}
if err := driver.VBoxManage("controlvm", vmName, "keyboardputscancode", code); err != nil {
ui.Error(fmt.Sprintf("Error sending boot command: %s", err))
return multistep.ActionHalt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment