fix(modpack): 安装 MCBBS 整合包时 JVM 参数处理有误 - #3499
Open
Pigeon0v0 wants to merge 2 commits into
Open
Conversation
> Generated by GPT-5.6 Terra xHigh
Contributor
审阅者指南(在小型 PR 上折叠)审阅者指南此 PR 通过正确支持配置字段的数组和标量两种形式,修复了在安装 MCBBS 整合包时对 JVM 和游戏参数的处理。 文件级变更
提示与命令与 Sourcery 交互
自定义你的体验访问你的 控制面板 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR fixes JVM and game argument handling when installing MCBBS modpacks by correctly supporting both array and scalar forms of the configuration fields. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层次的反馈:
- 在拼接
JsonArray的值时,考虑使用带空值检查的GetValue<string>(),而不是argument?.ToString(),以避免 JSON 编码后的输出(例如带引号的字符串)出现在 JVM/游戏参数中。 - 在调用
string.Join之前,你可能需要在JsonArray中跳过空或为空字符串的条目,否则生成的参数列表中可能会出现多余的空格,或者字面量字符串"null"。
供 AI 代理使用的提示
Please address the comments from this code review:
## Overall Comments
- When joining `JsonArray` values, consider using `GetValue<string>()` (with null checks) instead of `argument?.ToString()` to avoid JSON-encoded output (e.g., quoted strings) ending up in the JVM/game arguments.
- You might want to skip null or empty entries in the `JsonArray` before `string.Join`, otherwise you can end up with extra spaces or the literal string `"null"` in the resulting argument lists.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- When joining
JsonArrayvalues, consider usingGetValue<string>()(with null checks) instead ofargument?.ToString()to avoid JSON-encoded output (e.g., quoted strings) ending up in the JVM/game arguments. - You might want to skip null or empty entries in the
JsonArraybeforestring.Join, otherwise you can end up with extra spaces or the literal string"null"in the resulting argument lists.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- When joining `JsonArray` values, consider using `GetValue<string>()` (with null checks) instead of `argument?.ToString()` to avoid JSON-encoded output (e.g., quoted strings) ending up in the JVM/game arguments.
- You might want to skip null or empty entries in the `JsonArray` before `string.Join`, otherwise you can end up with extra spaces or the literal string `"null"` in the resulting argument lists.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Summary by Sourcery
错误修复:
launchInfo值。Original summary in English
Summary by Sourcery
Bug Fixes: