communicator/winrm: log exit code of processes
This commit is contained in:
parent
506a657775
commit
b25b7d1fb2
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue