diff options
author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-09-03 02:00:01 +0700 |
---|---|---|
committer | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-09-02 19:16:19 +0000 |
commit | 9633195ae1e1a545c24eb71202c5c5f8965d2c4a (patch) | |
tree | eea08a7bcbb845e9d073fa5dfcf6879e5114098e /src/make.rc | |
parent | 7609b5070174905478ba33876679c9b592367a5c (diff) | |
download | go-9633195ae1e1a545c24eb71202c5c5f8965d2c4a.tar.gz go-9633195ae1e1a545c24eb71202c5c5f8965d2c4a.zip |
src: do not emit warning when GOROOT_BOOTSTRAP is unset
Fixes #48155
Change-Id: I610a20d3af55035bb0b1047509361b204253801e
Reviewed-on: https://go-review.googlesource.com/c/go/+/347273
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.rc')
-rwxr-xr-x | src/make.rc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/make.rc b/src/make.rc index 29d8c675db..ba8c5db2d9 100755 --- a/src/make.rc +++ b/src/make.rc @@ -51,15 +51,20 @@ GOENV=off GOFLAGS=() GO111MODULE=() GOROOT = `{cd .. && pwd} -if(! ~ $#GOROOT_BOOTSTRAP 1) +goroot_bootstrap_set = 'true' +if(! ~ $#GOROOT_BOOTSTRAP 1){ + goroot_bootstrap_set = 'false' GOROOT_BOOTSTRAP = $home/go1.4 +} for(p in $path){ if(! test -x $GOROOT_BOOTSTRAP/bin/go){ if(go_exe = `{path=$p whatis go}){ goroot = `{GOROOT='' $go_exe env GOROOT} if(! ~ $goroot $GOROOT){ - echo 'WARNING: '$GOROOT_BOOTSTRAP'/bin/go does not exist, found '$go_exe' from env' >[1=2] - echo 'WARNING: set '$goroot' as GOROOT_BOOTSTRAP' >[1=2] + if(~ $goroot_bootstrap_set 'true'){ + echo 'WARNING: '$GOROOT_BOOTSTRAP'/bin/go does not exist, found '$go_exe' from env' >[1=2] + echo 'WARNING: set '$goroot' as GOROOT_BOOTSTRAP' >[1=2] + } GOROOT_BOOTSTRAP = $goroot } } |