]> Cypherpunks repositories - gostls13.git/commitdiff
make.rc: correct test for undefined GOROOT_BOOTSTRAP
authorRichard Miller <millerresearch@gmail.com>
Thu, 14 Nov 2024 16:00:22 +0000 (16:00 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 14 Nov 2024 18:02:59 +0000 (18:02 +0000)
The test "if(! ~ $#GOROOT_BOOTSTRAP 1)", to check for the environment
variable GOROOT_BOOTSTRAP being undefined, will not succeed if the
variable is set to the empty string (as the coordinator was doing).
A better test is "if(~ $"GOROOT_BOOTSTRAP '')", which succeeds if
the variable is undefined, or set to an empty list or an empty string.

For #69038

Change-Id: Ic6e6944e0c76461daea206ba9575b863f92f6228
Reviewed-on: https://go-review.googlesource.com/c/go/+/627944
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David du Colombier <0intro@gmail.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/make.rc

index cfb9fa0aeb77adbfdf7b160f8da31475e36fea7e..b3beb75660d1e41de93cd6499ba84458d4806eab 100755 (executable)
@@ -51,7 +51,7 @@ fn bootstrapenv {
 bootgo = 1.22.6
 GOROOT = `{cd .. && pwd}
 goroot_bootstrap_set = 'true'
-if(! ~ $#GOROOT_BOOTSTRAP 1){
+if(~ $"GOROOT_BOOTSTRAP ''){
        goroot_bootstrap_set = 'false'
        GOROOT_BOOTSTRAP = $home/go1.4
        for(d in sdk/go$bootgo go$bootgo)