refactor: use bash arrays on macOS/Linux to support app names with sp…#1128
Merged
refactor: use bash arrays on macOS/Linux to support app names with sp…#1128
Conversation
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.
问题描述
#541 (comment)
在 Linux 和 macOS 的构建 Workflow 中,CLI 参数是通过字符串拼接构建的。当 App 名称包含空格(例如
Google Gemini)时,Bash 会将其错误地拆分为多个参数,导致构建失败:error: too many arguments. Expected 1 argument but got 2.解决方案
将参数处理方式从字符串拼接重构为 Bash 数组。这是处理 Shell 参数的最佳实践,能够正确包裹带空格的参数,同时完全兼容现有的不带空格的名称。