mirror of
https://github.com/golang/go
synced 2024-11-07 15:46:23 -07:00
cmd/go: fix TestScript/mod_gobuild_import on Plan 9
CL 125296 added TestScript/mod_gobuild_import. This test is failing on Plan 9, because go/build invokes the go tool which cannot be found in the path. The "PATH" environment variable has been updated to contain the path to the go tool on Unix and Windows, but on Plan 9, the analogous environment variable is called "path". This change fixes the script engine by setting the "path" environment variable on Plan 9. Fixes #26669. Change-Id: If1be50e14baceccee591f4f76b7e698f5e12a2d4 Reviewed-on: https://go-review.googlesource.com/126608 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
5ad0a524d2
commit
154394f8d3
@ -98,6 +98,10 @@ func (ts *testScript) setup() {
|
||||
":=" + string(os.PathListSeparator),
|
||||
}
|
||||
|
||||
if runtime.GOOS == "plan9" {
|
||||
ts.env = append(ts.env, "path="+testBin+string(filepath.ListSeparator)+os.Getenv("path"))
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
ts.env = append(ts.env, "exe=.exe")
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user