fix bepinex reinstall loop and enable free-user install flow#22470
Merged
Conversation
`addGameSupport` applied DEFAULT_VERSION ("5.4.22") even to games
whose customPackDownloader ships a different BepInEx version
(e.g. I Am Future ships 5.4.23). The pinned-version check in
ensureBepInExPack then fired on every will-deploy, re-invoked the CPD,
and looped the "replace existing mod?" dialog indefinitely.
- Skip DEFAULT_VERSION in addGameSupport when a CPD is set; gate the
pinned-version check in ensureBepInExPack on the same condition.
- Replace the slice(0, 6) version truncation with a regex so patch
numbers >= 100 (e.g. 5.4.110) aren't corrupted.
- Swap the premium-gated nexus-download in download() for a
start-download via nxm://, mirroring the SMAPI flow. Free users now
get the browser-redirect dialog instead of a silent rejection.
- Drop the now-dead NotPremiumError class and its catches.
- Flatten ensureBepInExPack, dedupe download()'s install paths, and
key updateSupportedGames off the downloadId directly.
fixes https://linear.app/nexus-mods/issue/APP-324/bepinex-constant-reinstall-loop-via-modtype-bepinex-extension
fixes #20876
erri120
approved these changes
Apr 16, 2026
github-actions bot
pushed a commit
that referenced
this pull request
Apr 16, 2026
fix bepinex reinstall loop and enable free-user install flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
addGameSupportapplied DEFAULT_VERSION ("5.4.22") even to games whose customPackDownloader (CPD) ships a different BepInEx version (e.g. I Am Future ships 5.4.23). The pinned-version check in ensureBepInExPack then fired on every will-deploy, re-invoked the CPD, and looped the "replace existing mod?" dialog indefinitely.fixes https://linear.app/nexus-mods/issue/APP-324/bepinex-constant-reinstall-loop-via-modtype-bepinex-extension fixes #20876
NOTE: this will not be backported to 1.16; fix will only be available for 2.0