Skip to content

CurseForge token fetch + decrypt block copy-pasted 7x across two modules, timeouts drifting #47

Description

@aradanmn

The token.enc download + openssl decrypt + cleanup sequence is duplicated at 7 sites despite a consolidated helper already existing:

  • modules/mod_management.sh: check_curseforge_mod (~283), resolve_curseforge_dependencies (~687), resolve_curseforge_dependencies_api (~852), fetch_and_add_external_mod (~1041), get_curseforge_download_url (~1141), get_curseforge_api_token (~1262 — the intended single home)
  • modules/version_management.sh: check_mod_version_compatibility (~211)

The copies have already drifted (timeout 10 curl vs plain curl vs wget variants), and every site fails soft with || true, so a missed edit surfaces as "mods mysteriously reported incompatible" rather than an error. Any change to the fetch/decrypt mechanics requires 7 synchronized edits.

Fix: route all 6 other sites through get_curseforge_api_token() and move it to a shared utility so version_management.sh can use it too. (Verified 2026-07-05: 7 occurrences via grep. Plan ref: Part 5 item D2.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanupTech debt / dead code

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions