From a763084ed2e19653952764c1ed0da0329bd94a89 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Thu, 14 Nov 2024 16:00:22 +0000 Subject: [PATCH] make.rc: correct test for undefined GOROOT_BOOTSTRAP 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 Reviewed-by: David du Colombier <0intro@gmail.com> Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Ian Lance Taylor --- src/make.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/make.rc b/src/make.rc index cfb9fa0aeb..b3beb75660 100755 --- a/src/make.rc +++ b/src/make.rc @@ -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) -- 2.48.1