Commit ac58773e authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: better error output from vmrun

parent f32d9879
......@@ -129,7 +129,12 @@ func runAndLog(cmd *exec.Cmd) (string, string, error) {
stderrString := strings.TrimSpace(stderr.String())
if _, ok := err.(*exec.ExitError); ok {
err = fmt.Errorf("VMware error: %s", stderrString)
message := stderrString
if message == "" {
message = stdoutString
}
err = fmt.Errorf("VMware error: %s", message)
}
log.Printf("stdout: %s", stdoutString)
......
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