File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -152,14 +152,17 @@ if [ "$1" = "-v" ]; then
152
152
shift
153
153
fi
154
154
155
+ goroot_bootstrap_set=${GOROOT_BOOTSTRAP+" true" }
155
156
export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:- $HOME / go1.4}
156
157
export GOROOT=" $( cd .. && pwd) "
157
158
IFS=$' \n ' ; for go_exe in $( type -ap go) ; do
158
159
if [ ! -x " $GOROOT_BOOTSTRAP /bin/go" ]; then
159
160
goroot=$( GOROOT=' ' GOOS=' ' GOARCH=' ' " $go_exe " env GOROOT)
160
161
if [ " $goroot " != " $GOROOT " ]; then
161
- printf ' WARNING: %s does not exist, found %s from env\n' " $GOROOT_BOOTSTRAP /bin/go" " $go_exe " >&2
162
- printf ' WARNING: set %s as GOROOT_BOOTSTRAP\n' " $goroot " >&2
162
+ if [ " $goroot_bootstrap_set " = " true" ]; then
163
+ printf ' WARNING: %s does not exist, found %s from env\n' " $GOROOT_BOOTSTRAP /bin/go" " $go_exe " >&2
164
+ printf ' WARNING: set %s as GOROOT_BOOTSTRAP\n' " $goroot " >&2
165
+ fi
163
166
GOROOT_BOOTSTRAP=$goroot
164
167
fi
165
168
fi
Original file line number Diff line number Diff line change @@ -51,15 +51,20 @@ GOENV=off
51
51
GOFLAGS=()
52
52
GO111MODULE=()
53
53
GOROOT = ` {cd .. && pwd}
54
- if(! ~ $# GOROOT_BOOTSTRAP 1)
54
+ goroot_bootstrap_set = ' true'
55
+ if(! ~ $# GOROOT_BOOTSTRAP 1){
56
+ goroot_bootstrap_set = ' false'
55
57
GOROOT_BOOTSTRAP = $home /go1.4
58
+ }
56
59
for(p in $path ){
57
60
if(! test -x $GOROOT_BOOTSTRAP /bin/go){
58
61
if(go_exe = ` {path=$p whatis go}){
59
62
goroot = ` {GOROOT=' ' $go_exe env GOROOT}
60
63
if(! ~ $goroot $GOROOT ){
61
- echo ' WARNING: ' $GOROOT_BOOTSTRAP ' /bin/go does not exist, found ' $go_exe ' from env' > [1= 2]
62
- echo ' WARNING: set ' $goroot ' as GOROOT_BOOTSTRAP' > [1= 2]
64
+ if(~ $goroot_bootstrap_set ' true' ){
65
+ echo ' WARNING: ' $GOROOT_BOOTSTRAP ' /bin/go does not exist, found ' $go_exe ' from env' > [1= 2]
66
+ echo ' WARNING: set ' $goroot ' as GOROOT_BOOTSTRAP' > [1= 2]
67
+ }
63
68
GOROOT_BOOTSTRAP = $goroot
64
69
}
65
70
}
You can’t perform that action at this time.
0 commit comments