fix: 可通过本地安装 同时安装 Cleanroom 与 Forge - #6496
Conversation
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3de5fa8ecd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (analyzer.has(LibraryAnalyzer.LibraryType.FORGE)) { | ||
| throw new UnsupportedInstallationException(CLEANROOM_NOT_COMPATIBLE_WITH_FORGE); |
There was a problem hiding this comment.
Identify Cleanroom before rejecting Forge instances
When the target instance already contains Forge, DefaultDependencyManager.installLibraryAsync(Version, Path) calls this Cleanroom detector first and only catches IOException. This check therefore throws before inspecting the selected file, so any local installer—including a supported Forge-compatible OptiFine installer—aborts with the Cleanroom conflict message instead of reaching the OptiFine detector. Perform the compatibility check only after install_profile.json has confirmed that the file is actually a Cleanroom installer.
Useful? React with 👍 / 👎.
# Conflicts: # HMCLCore/src/main/java/org/jackhuang/hmcl/download/cleanroom/CleanroomInstallTask.java # HMCLCore/src/main/java/org/jackhuang/hmcl/download/forge/ForgeInstallTask.java
No description provided.