From 14be5355ae68b05829504ec4170becc6313aee82 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sat, 17 Oct 2026 17:18:48 +1100 Subject: [PATCH] fix(install): name the required Go version when its toolchain is unavailable --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index 1ed771fa6..4a2e3ca21 100755 --- a/install.sh +++ b/install.sh @@ -103,6 +103,14 @@ if [ "${FROM_SOURCE}" = true ]; then git clone --quiet --depth=1 "https://github.com/${REPO}.git" "${SRC_DIR}" fi echo "==> Building from ${SRC_DIR}..." + # Selects (and under the default GOTOOLCHAIN=auto, downloads) the toolchain + # go.mod requires, so a missing one fails here rather than mid-build. + required="$(sed -n 's/^go //p' "${SRC_DIR}/go.mod")" + if ! out="$(cd "${SRC_DIR}" && go list -m 2>&1)"; then + echo "Error: Archie needs Go ${required}, which is not available: ${out}" >&2 + echo "Install Go ${required} from https://go.dev/dl, or allow the download with GOTOOLCHAIN=auto and network access to proxy.golang.org." >&2 + exit 1 + fi STAGE="${TMP}/stage" mkdir -p "${STAGE}" # A source build is not a release: it says `dev`, and buildType=binary lets