aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2020-09-10 13:21:41 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2020-09-10 12:11:16 +0000
commit07d19b2597af253ed78ef43ba6e7a49db9a8f4ba (patch)
tree2a8425e3d69d6d1a0f36b3491a7115e03717dc23
parentdfdc3880b01d46d1d8125ab9eea0606b2fa5b819 (diff)
downloadgo-07d19b2597af253ed78ef43ba6e7a49db9a8f4ba.tar.gz
go-07d19b2597af253ed78ef43ba6e7a49db9a8f4ba.zip
all: check GOROOT_BOOTSTRAP executable before bootsrappping
Otherwise we’d still be writing that we're building cmd/dist even if GOROOT_BOOTSTRAP we’re wrongly set. Change-Id: I940e18c3cebae5664f85babc9919e9eb215d5093 Reviewed-on: https://go-review.googlesource.com/c/go/+/253877 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
-rwxr-xr-xsrc/make.bash10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/make.bash b/src/make.bash
index 880a0f43d5..3a84658c72 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -162,16 +162,16 @@ IFS=$'\n'; for go_exe in $(type -ap go); do
fi
fi
done; unset IFS
-GOROOT_BOOTSTRAP_VERSION=$($GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //')
-echo "Building Go cmd/dist using $GOROOT_BOOTSTRAP. ($GOROOT_BOOTSTRAP_VERSION)"
-if $verbose; then
- echo cmd/dist
-fi
if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2
exit 1
fi
+GOROOT_BOOTSTRAP_VERSION=$($GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //')
+echo "Building Go cmd/dist using $GOROOT_BOOTSTRAP. ($GOROOT_BOOTSTRAP_VERSION)"
+if $verbose; then
+ echo cmd/dist
+fi
if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
echo "ERROR: \$GOROOT_BOOTSTRAP must not be set to \$GOROOT" >&2
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2