Rely on context to cancel typing boot command.

This commit is contained in:
Matthew Hooker 2018-04-12 11:48:36 -07:00
parent 673245afcf
commit 4e2f14196a
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 0 additions and 6 deletions

View File

@ -129,12 +129,6 @@ func (s *StepTypeBootCommand) Run(ctx context.Context, state multistep.StateBag)
return multistep.ActionHalt return multistep.ActionHalt
} }
// Check for interrupts between typing things so we can cancel
// since this isn't the fastest thing.
if _, ok := state.GetOk(multistep.StateCancelled); ok {
return multistep.ActionHalt
}
if pauseFn != nil { if pauseFn != nil {
pauseFn(multistep.DebugLocationAfterRun, fmt.Sprintf("boot_command[%d]: %s", i, command), state) pauseFn(multistep.DebugLocationAfterRun, fmt.Sprintf("boot_command[%d]: %s", i, command), state)
} }