mirror of
https://github.com/golang/go
synced 2024-11-22 02:24:41 -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:
parent
554082d6b1
commit
6c651728d8
@ -250,6 +250,10 @@ func doRun(argv []string, returnStdout bool) string {
|
|||||||
if xFlag {
|
if xFlag {
|
||||||
fmt.Printf("gotest: %s\n", strings.Join(argv, " "))
|
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
|
var err os.Error
|
||||||
argv[0], err = exec.LookPath(argv[0])
|
argv[0], err = exec.LookPath(argv[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user