diff options
| author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-06-09 14:26:36 +0700 |
|---|---|---|
| committer | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-09-02 07:31:53 +0000 |
| commit | 840b4292c9cd5472babf562d3b6eaf727926fd90 (patch) | |
| tree | 77a21572f5a17e9f2e444f7b03acf876a7b1eed1 /src/make.bash | |
| parent | 1ae7ddc2350b2dd30e1f3ad877c3c70ef745111d (diff) | |
| download | go-840b4292c9cd5472babf562d3b6eaf727926fd90.tar.xz | |
src: emit warning when make.bash run with invalid GOROOT_BOOTSTRAP
When setting an invalid GOROOT_BOOTSTRAP, make.bash try looking at env to
find a valid go command and use that GOROOT instead. It's better if the
script emit a warning, instead of silently change the GOROOT_BOOTSTRAP.
Change-Id: I6038093d5e8c072da27bcae44b125f6774f809a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/326030
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@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 7986125a06..9ff471d863 100755 --- a/src/make.bash +++ b/src/make.bash @@ -158,6 +158,8 @@ IFS=$'\n'; for go_exe in $(type -ap go); do if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then goroot=$(GOROOT='' GOOS='' GOARCH='' "$go_exe" env GOROOT) if [ "$goroot" != "$GOROOT" ]; then + printf 'WARNING: %s does not exist, found %s from env\n' "$GOROOT_BOOTSTRAP/bin/go" "$go_exe" >&2 + printf 'WARNING: set %s as GOROOT_BOOTSTRAP\n' "$goroot" >&2 GOROOT_BOOTSTRAP=$goroot fi fi |
