Skip to content

[java/curseforge] Install script fixes and enhancements#131

Open
vrrdnt wants to merge 5 commits into
pelican-eggs:mainfrom
vrrdnt:curseforge/install-script-fixes
Open

[java/curseforge] Install script fixes and enhancements#131
vrrdnt wants to merge 5 commits into
pelican-eggs:mainfrom
vrrdnt:curseforge/install-script-fixes

Conversation

@vrrdnt

@vrrdnt vrrdnt commented May 6, 2026

Copy link
Copy Markdown

Description

Fixes three install-script bugs in the CurseForge generic egg, plus one variable default cleanup.

May resolve:
#121
#127

Commits:

  1. [java/curseforge] Fix null/zero serverPackFileId crash on latest install -- Resolves [Install Bug]: Curseforge Generic #121. Adds select(. != null and . != 0) guards in two jq expressions so they stop emitting the literal strings "null" / "0" when CurseForge returns those for serverPackFileId.

  2. [java/curseforge] Extract download URL resolution into a helper -- Pure refactor. Consolidates three duplicated /v1/mods/{pid}/files/{fid}/download-url fetches into one cf_resolve_download_url helper. Same endpoint, auth, parsing, and empty-on-failure behavior.

  3. [java/curseforge] Surface clear error when API distribution is disabled -- When a project has allowModDistribution: false, /download-url returns 403 with no body. Replace the opaque "No download url found" message at all three call sites with a prominent block that names the cause (author has opted out of API distribution) and tells the user to download the pack manually. For json_download_mods, retain the existing continue behavior but warn loudly that the install will be incomplete. The egg deliberately does not bypass the flag by constructing edge.forgecdn.net URLs from fileId/fileName, as doing so would ignore the author's wishes and risk API key revocation.

  4. [java/curseforge] Default modpack File ID to blank -- Variable default change only. The script already treats "" and "latest" identically (both fall back to mainFileId); drop the magic-string default so users get newest-version behavior by leaving the field blank.

  5. [java/curseforge] Mirror fixes to pterodactyl egg variant -- The install script between the pelican egg and pterodactyl egg are identical, so the fixes were copied over to the pelican variant's install script.

Tested locally against a real Pelican panel install with several modpacks, including one with allowModDistribution: false (COBBLEVERSE - Pokemon Adventure [Cobblemon], project 1210677) to verify the new error path is reached and the message displays cleanly.

Checklist for all submissions

  • Have you followed the guidelines in our Contributing document?

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

  • Have you tested and reviewed your changes with confidence that everything works?

  • Did you branch your changes and PR from that branch and not from your master branch?

  • You verify that the start command applied does not use a shell script

    • If some script is needed then it is part of a current yolk or a PR to add one
  • The egg was exported from the panel

@vrrdnt

vrrdnt commented May 23, 2026

Copy link
Copy Markdown
Author

Is anyone available to give this a review?

@QuintenQVD0 QuintenQVD0 requested a review from parkervcp May 28, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Install Bug]: Curseforge Generic

1 participant