1
0
mirror of https://github.com/golang/go synced 2024-11-25 06:07:58 -07:00

gotest: execute gomake properly on Windows

R=peterGo, rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/4280087
This commit is contained in:
Alex Brainman 2011-04-01 10:10:15 +11:00
parent 554082d6b1
commit 6c651728d8

View File

@ -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 {