fix(install): name the required Go version when its toolchain is unavailable
This commit is contained in:
1 file changed
+8
@@ -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
|
||||
|
||||
Reference in new issue
Block a user