Optionally rerun installJRMC on repo failure

This commit is contained in:
2025-10-21 18:56:56 -04:00
parent 8a38cbef41
commit 4683ed4c0e

View File

@@ -701,15 +701,11 @@ install_mc_repo() {
# Update package lists
if ! execute "${PKG_UPDATE[@]}"; then
error=$?
debug "Error code: $error"
err "Package update failed!"
if [[ $error -eq 100 ]]; then
if [[ $MC_REPO != "$MC_REPO_HARDCODE" ]] &&
ask_ok "Re-run installJRMC with --mcrepo=$MC_REPO_HARDCODE?"; then
exec "$SCRIPT_PATH" "$@" "--no-update" "--mcrepo=$MC_REPO_HARDCODE"
fi
fi
return 1
fi