You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: update.sh
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -451,8 +451,8 @@ do_version_upgrade() {
451
451
# Use PIPESTATUS to capture dnf exit code, not tee's
452
452
sudo dnf system-upgrade download --releasever="$target_version" -y 2>&1| tee "$download_output"
453
453
if [ "${PIPESTATUS[0]}"-ne 0 ];then
454
-
# Check if version doesn't exist
455
-
if grep -qi"unable to find.*releasever\|no such.*version\|not found""$download_output"2>/dev/null;then
454
+
# Check if version doesn't exist (catch 404 errors, missing repos, etc.)
455
+
if grep -qiE"unable to find.*releasever|no such.*version|not found|status code: 404|Failed to download metadata|Cannot prepare internal mirrorlist""$download_output"2>/dev/null;then
456
456
print_error "Fedora $target_version is not available yet."
457
457
print_info "This version may not be released or may not be supported for upgrade."
458
458
echo""
@@ -483,7 +483,7 @@ do_version_upgrade() {
483
483
# Use PIPESTATUS to capture dnf exit code, not tee's
484
484
sudo dnf system-upgrade download --releasever="$target_version" --allowerasing -y 2>&1| tee "$download_output"
485
485
if [ "${PIPESTATUS[0]}"-ne 0 ];then
486
-
if grep -qi"unable to find.*releasever\|no such.*version\|not found""$download_output"2>/dev/null;then
486
+
if grep -qiE"unable to find.*releasever|no such.*version|not found|status code: 404|Failed to download metadata|Cannot prepare internal mirrorlist""$download_output"2>/dev/null;then
487
487
print_error "Fedora $target_version is not available."
0 commit comments