fix(build): Recognize Go Beta versions in makefile (#8677)
* 🩹 Fix building with beta Go versions * ✏️ Use `[:space:]` to be more canonical
Nato Boram committed
Feb 15, 2022 at 17:47 UTC
ef63822ef021fa6abccc66b2805267b0ddeb8375
1 file changed
+1
-1
bin/check_go_version
+1
-1
@@ -39,6 +39,6 @@ type ${GOCC} >/dev/null 2>&1 || die_upgrade "go is not installed or not in the P
39
40
VERS_STR=$(${GOCC} version 2>&1) || die "'go version' failed with output: $VERS_STR"
41
42
-GO_CUR_VERSION=$(expr "$VERS_STR" : ".*go version go\([^ ]*\) .*") || die "Invalid 'go version' output: $VERS_STR"
42
+GO_CUR_VERSION=$(expr "$VERS_STR" : ".*go version.* go\([^[:space:]]*\) .*") || die "Invalid 'go version' output: $VERS_STR"
43
44
check_at_least_version "$GO_MIN_VERSION" "$GO_CUR_VERSION" "${GOCC}"