Run repo fallback automatically

This commit is contained in:
2026-01-21 06:11:40 -05:00
parent 6184ef7cbd
commit d59ff67d59

View File

@@ -646,7 +646,7 @@ install_legacy_repo() {
EOF
# Set a trap to always cleanup legacy repo
# shellcheck disable=SC2064
# trap "sudo rm -f $temp_repo_file" EXIT INT TERM
trap "sudo rm -f $temp_repo_file" EXIT INT TERM
fi
}
@@ -1837,9 +1837,8 @@ main() {
echo "Updating package lists"
if ! execute "${PKG_UPDATE[@]}"; then
err "Package update failed!"
debug "MC_REPO: $MC_REPO, MC_REPO_HARDCODE: $MC_REPO_HARDCODE"
if [[ $MC_REPO != "$MC_REPO_HARDCODE" ]] &&
ask_ok "Re-run installJRMC with --mcrepo=$MC_REPO_HARDCODE?"; then
if [[ $MC_REPO != "$MC_REPO_HARDCODE" ]]; then
echo "Rerunning installJRMC with --mcrepo=$MC_REPO_HARDCODE"
exec "$SCRIPT_PATH" "$@" "--no-update" "--mcrepo=$MC_REPO_HARDCODE"
fi
return 1