wait for shutdown command to end so we get stderr/out

This commit is contained in:
Matthew Hooker 2016-10-22 10:33:27 -07:00
parent e9a5d05a2f
commit d6bed79429
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,11 @@ func (s *StepShutdown) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionHalt
}
// Wait for the command to run so we can print std{err,out}
// We don't care if the command errored, since we'll notice
// if the vm didn't shut down.
cmd.Wait()
log.Printf("Shutdown stdout: %s", stdout.String())
log.Printf("Shutdown stderr: %s", stderr.String())