diff options
| author | Mateusz Poliwczak <mpoliwczak34@gmail.com> | 2024-05-26 18:27:53 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-05-29 13:48:46 +0000 |
| commit | 78eadc87df453c2a325fd9762d57e3232179b631 (patch) | |
| tree | cd4e20734c6659e4927438a221486ee51ec8e7cc /src/make.bash | |
| parent | 13c49096fd3b08ef53742dd7ae8bcfbfa45f3173 (diff) | |
| download | go-78eadc87df453c2a325fd9762d57e3232179b631.tar.xz | |
make.bash: preserve GOROOT_BOOTSTRAP
CL 582076 made the GOROOT_BOOTSTRAP set to "", which in turn
causes the next iteration to return true. "$GOROOT_BOOTSTRAP/bin/go"
becomes "/bin/go", which always exists.
Fixes #67654
Change-Id: I290bd4a7defc58e4b34d5bf955ef4f34569ff0ed
GitHub-Last-Rev: 9c7134fa44874b0a9d03807aa583b1088cc13922
GitHub-Pull-Request: golang/go#67655
Reviewed-on: https://go-review.googlesource.com/c/go/+/588436
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/make.bash')
| -rwxr-xr-x | src/make.bash | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/make.bash b/src/make.bash index 5b49fcccf7..814b7e87e1 100755 --- a/src/make.bash +++ b/src/make.bash @@ -166,8 +166,10 @@ bootstrapenv() { export GOROOT="$(cd .. && pwd)" IFS=$'\n'; for go_exe in $(type -ap go); do if [[ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]]; then + goroot_bootstrap=$GOROOT_BOOTSTRAP GOROOT_BOOTSTRAP="" goroot=$(bootstrapenv "$go_exe" env GOROOT) + GOROOT_BOOTSTRAP=$goroot_bootstrap if [[ "$goroot" != "$GOROOT" ]]; then if [[ "$goroot_bootstrap_set" == "true" ]]; then printf 'WARNING: %s does not exist, found %s from env\n' "$GOROOT_BOOTSTRAP/bin/go" "$go_exe" >&2 |
