communicator/winrm: log exit code of processes

This commit is contained in:
Mitchell Hashimoto 2015-06-14 11:19:26 -07:00
parent 506a657775
commit b25b7d1fb2
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ func runCommand(shell *winrm.Shell, cmd *winrm.Command, rc *packer.RemoteCmd) {
go io.Copy(rc.Stderr, cmd.Stderr)
cmd.Wait()
rc.SetExited(cmd.ExitCode())
code := cmd.ExitCode()
log.Printf("[INFO] command '%s' exited with code: %d", rc.Command, code)
rc.SetExited(code)
}
// Upload implementation of communicator.Communicator interface