Commit b25b7d1f authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

communicator/winrm: log exit code of processes

parent 506a6577
...@@ -89,7 +89,10 @@ func runCommand(shell *winrm.Shell, cmd *winrm.Command, rc *packer.RemoteCmd) { ...@@ -89,7 +89,10 @@ func runCommand(shell *winrm.Shell, cmd *winrm.Command, rc *packer.RemoteCmd) {
go io.Copy(rc.Stderr, cmd.Stderr) go io.Copy(rc.Stderr, cmd.Stderr)
cmd.Wait() 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 // Upload implementation of communicator.Communicator interface
......
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