Fixes #25962
Change-Id: I10d41713f6aef100d7b2c8c976f22d1c8ac376d5
Reviewed-on: https://go-review.googlesource.com/119937
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
export GOROOT="$(cd .. && pwd)"
IFS=$'\n'; for go_exe in $(type -ap go); do
if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
- goroot=$(GOROOT='' "$go_exe" env GOROOT)
+ goroot=$(GOROOT='' GOOS='' GOARCH='' "$go_exe" env GOROOT)
if [ "$goroot" != "$GOROOT" ]; then
GOROOT_BOOTSTRAP=$goroot
fi