builder/vmware: convert line endings in workstation to Unix-style

This commit is contained in:
Mitchell Hashimoto 2013-07-31 13:58:57 -07:00
parent 8ac86e49d0
commit 6aacf20167
1 changed files with 6 additions and 1 deletions

View File

@ -155,5 +155,10 @@ func (d *Workstation9Driver) runAndLog(cmd *exec.Cmd) (string, string, error) {
log.Printf("stdout: %s", stdoutString) log.Printf("stdout: %s", stdoutString)
log.Printf("stderr: %s", stderrString) 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
} }