Skip to content

Commit 874d8f0

Browse files
committed
fix(quickget): skip unsupported architectures for all operations
- Remove the OPERATION == "test" guard so is_arch_supported() is evaluated unconditionally - Apply the unconditional arch check in test_all() for editions loop, ubuntu-server, ubuntu desktop (ubuntu*), and the default case - Skip generating URLs / running further logic when an OS is not available for the requested ARCH IMPACT: quickget will no longer attempt to generate or test downloads for architectures that the distro does not support, preventing incorrect URL generation and false-positive test attempts. Signed-off-by: Martin Wimpress <martin@wimpress.org>
1 parent d40dd70 commit 874d8f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

quickget

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ function test_all() {
573573
if [[ $(type -t "editions_${OS}") == function ]]; then
574574
for EDITION in $(editions_"${OS}"); do
575575
# Check architecture support before generating URL
576-
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
576+
if ! is_arch_supported "${OS}" "${ARCH}"; then
577577
test_result "${OS}" "${RELEASE}" "${EDITION}" "" "SKIP" "(not available for ${ARCH})"
578578
continue
579579
fi
@@ -601,23 +601,23 @@ function test_all() {
601601
(get_macos)
602602
elif [ "${OS}" == "ubuntu-server" ]; then
603603
# Check architecture support before generating URL
604-
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
604+
if ! is_arch_supported "${OS}" "${ARCH}"; then
605605
test_result "${OS}" "${RELEASE}" "" "" "SKIP" "(not available for ${ARCH})"
606606
continue
607607
fi
608608
validate_release releases_ubuntu-server
609609
(get_ubuntu-server)
610610
elif [[ "${OS}" == *ubuntu* ]]; then
611611
# Ubuntu desktop is amd64 only (no arch function = amd64 default)
612-
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
612+
if ! is_arch_supported "${OS}" "${ARCH}"; then
613613
test_result "${OS}" "${RELEASE}" "" "" "SKIP" "(not available for ${ARCH})"
614614
continue
615615
fi
616616
validate_release releases_ubuntu
617617
(get_ubuntu)
618618
else
619619
# Check architecture support before generating URL
620-
if [ "${OPERATION}" == "test" ] && ! is_arch_supported "${OS}" "${ARCH}"; then
620+
if ! is_arch_supported "${OS}" "${ARCH}"; then
621621
test_result "${OS}" "${RELEASE}" "" "" "SKIP" "(not available for ${ARCH})"
622622
continue
623623
fi

0 commit comments

Comments
 (0)