From 6aacf20167e4b0610b964325e9372de4b722c38e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 31 Jul 2013 13:58:57 -0700 Subject: [PATCH] builder/vmware: convert line endings in workstation to Unix-style --- builder/vmware/driver_workstation9.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/builder/vmware/driver_workstation9.go b/builder/vmware/driver_workstation9.go index 54856a38b..f7aa319f8 100644 --- a/builder/vmware/driver_workstation9.go +++ b/builder/vmware/driver_workstation9.go @@ -155,5 +155,10 @@ func (d *Workstation9Driver) runAndLog(cmd *exec.Cmd) (string, string, error) { log.Printf("stdout: %s", stdoutString) log.Printf("stderr: %s", stderrString) - return stdout.String(), stderr.String(), err + // Replace these for Windows, we only want to deal with Unix + // style line endings. + returnStdout := strings.Replace(stdout.String(), "\r\n", "\n", -1) + returnStderr := strings.Replace(stderr.String(), "\r\n", "\n", -1) + + return returnStdout, returnStderr, err }