tool/gocross: respect TS_GO_NEXT=1 in gocross too
The gocross-wrapper.sh bash script already checks TS_GO_NEXT (as of
a374cc344e) to select go.toolchain.next.rev over go.toolchain.rev,
but when TS_USE_GOCROSS=1 the Go binary itself was hardcoded to read
go.toolchain.rev. This makes gocross also respect the TS_GO_NEXT=1
environment variable.
Updates tailscale/corp#36382
Change-Id: I04bef25a34e7ed3ccb1bfdb33a3a1f896236c6ee
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
6854d2982b
commit
3f3af841af
@@ -43,7 +43,11 @@ findTopLevel:
|
||||
}
|
||||
}
|
||||
|
||||
return readRevFile(filepath.Join(d, "go.toolchain.rev"))
|
||||
revFile := "go.toolchain.rev"
|
||||
if os.Getenv("TS_GO_NEXT") == "1" {
|
||||
revFile = "go.toolchain.next.rev"
|
||||
}
|
||||
return readRevFile(filepath.Join(d, revFile))
|
||||
}
|
||||
|
||||
func readRevFile(path string) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user