Skip to content

refactor: use bash arrays on macOS/Linux to support app names with sp…#1128

Merged
tw93 merged 1 commit intotw93:mainfrom
RoyRao2333:main
Feb 6, 2026
Merged

refactor: use bash arrays on macOS/Linux to support app names with sp…#1128
tw93 merged 1 commit intotw93:mainfrom
RoyRao2333:main

Conversation

@RoyRao2333
Copy link
Copy Markdown
Contributor

问题描述

#541 (comment)

在 Linux 和 macOS 的构建 Workflow 中,CLI 参数是通过字符串拼接构建的。当 App 名称包含空格(例如 Google Gemini)时,Bash 会将其错误地拆分为多个参数,导致构建失败:error: too many arguments. Expected 1 argument but got 2.

解决方案

将参数处理方式从字符串拼接重构为 Bash 数组。这是处理 Shell 参数的最佳实践,能够正确包裹带空格的参数,同时完全兼容现有的不带空格的名称。

注:Windows 构建使用的是 PowerShell 数组,原生支持空格,因此无需修改。

Copy link
Copy Markdown
Owner

@tw93 tw93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tw93 tw93 merged commit c0fe3c1 into tw93:main Feb 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants