Commit 799be52b authored by Alex Brainman's avatar Alex Brainman

gotest: another attempt to make it run on Windows

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4347041
parent 6c651728
......@@ -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])
......
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