fix(quickget): validate architecture before attempting download

Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
Martin Wimpress 2026-01-24 23:18:47 +00:00 committed by Martin Wimpress
parent 1f7ec7e52c
commit 5bbfdd1b54
1 changed files with 11 additions and 0 deletions

View File

@ -4064,6 +4064,17 @@ if [ "${CHECK_ALL_ARCH}" == "true" ] && [ -n "${2}" ]; then
exit 0 exit 0
fi fi
# Validate architecture support before attempting download
if ! is_arch_supported "${OS}" "${ARCH}"; then
if [ "${OPERATION}" == "test" ] || [ "${OPERATION}" == "show" ]; then
test_result "${OS}" "${2:-}" "${3:-}" "" "SKIP" "(not available for ${ARCH})"
exit 0
else
echo "ERROR! $(pretty_name "${OS}") is not available for ${ARCH} architecture."
exit 1
fi
fi
if [ -n "${2}" ]; then if [ -n "${2}" ]; then
RELEASE="${2}" RELEASE="${2}"
VM_PATH="${OS}-${RELEASE}" VM_PATH="${OS}-${RELEASE}"