From: Alex Brainman Date: Fri, 1 Apr 2011 02:38:33 +0000 (+1100) Subject: gotest: another attempt to make it run on Windows X-Git-Tag: weekly.2011-04-04~29 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=799be52b358c85b843c31f9aac7ed04d0349e501;p=gostls13.git gotest: another attempt to make it run on Windows R=golang-dev, rsc1 CC=golang-dev https://golang.org/cl/4347041 --- diff --git a/src/cmd/gotest/gotest.go b/src/cmd/gotest/gotest.go index d110a8d1a5..f69c7286fc 100644 --- a/src/cmd/gotest/gotest.go +++ b/src/cmd/gotest/gotest.go @@ -252,7 +252,14 @@ func doRun(argv []string, returnStdout bool) string { } if runtime.GOOS == "windows" && argv[0] == "gomake" { // gomake is a shell script and it cannot be executed directly on Windows. - argv = append([]string{"cmd", "/c", "sh", "-c"}, strings.Join(argv, " ")) + cmd := "" + for i, v := range argv { + if i > 0 { + cmd += " " + } + cmd += `"` + v + `"` + } + argv = []string{"cmd", "/c", "sh", "-c", cmd} } var err os.Error argv[0], err = exec.LookPath(argv[0])