diff options
author | Alex Brainman <alex.brainman@gmail.com> | 2011-04-01 10:10:15 +1100 |
---|---|---|
committer | Alex Brainman <alex.brainman@gmail.com> | 2011-04-01 10:10:15 +1100 |
commit | 6c651728d8d0871afb3cf0fb846d4bc2f888b310 (patch) | |
tree | 1c9058306cf168aa7618050aa985e7048a638453 | |
parent | 554082d6b188cec371f12bebee6f92da0ce7e396 (diff) | |
download | go-6c651728d8d0871afb3cf0fb846d4bc2f888b310.tar.gz go-6c651728d8d0871afb3cf0fb846d4bc2f888b310.zip |
gotest: execute gomake properly on Windows
R=peterGo, rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/4280087
-rw-r--r-- | src/cmd/gotest/gotest.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/gotest/gotest.go b/src/cmd/gotest/gotest.go index 9dc10fd5db..d110a8d1a5 100644 --- a/src/cmd/gotest/gotest.go +++ b/src/cmd/gotest/gotest.go @@ -250,6 +250,10 @@ func doRun(argv []string, returnStdout bool) string { if xFlag { fmt.Printf("gotest: %s\n", strings.Join(argv, " ")) } + 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, " ")) + } var err os.Error argv[0], err = exec.LookPath(argv[0]) if err != nil { |