Repository navigation
fix: 全局修正命令 - #48
Merged
Merged
fix: 全局修正命令#48
Conversation
将 `pnpm build:xxx -- --<arch>` 修正为 `pnpm build:xxx --<arch>`;将 `pnpm build:native -- --dev` 修正为 `pnpm build:native --dev`。前者会直接忽略架构参数,后者因为目前的参数解析逻辑简单所以没有区别 pnpm 自 v7 开始,将 `pnpm run <script>` 后的任何参数都添加到执行的脚本中而不需要 `--`
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 统一修正了仓库内 pnpm run <script> 传参方式:将历史写法里的 -- --<arg> 改为直接追加参数 --<arg>,避免把多余的 -- 作为“终止参数解析”的哑参数传给下游命令(如 electron-builder),从而导致架构参数被忽略;同时让文档与 CI 命令保持一致。
Changes:
- 将打包脚本示例与 CI 中的
pnpm build:{win,mac,linux} -- --<arch>改为pnpm build:{win,mac,linux} --<arch>,确保--x64/--arm64能被 electron-builder 正确识别。 - 将
pnpm build:native -- --dev改为pnpm build:native --dev,与当前scripts/build-native.ts的参数解析(args.includes("--dev"))一致。 - 同步更新 README / docs / AGENTS.md / CLAUDE.md 中的命令说明,避免使用者复制命令后踩坑。
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.zh-CN.md | 更新构建命令示例,去掉多余的 -- 传参分隔符。 |
| README.md | 同步英文 README 的构建命令示例修正。 |
| package.json | 修正 dev 脚本对 build:native 的参数传递方式为 --dev。 |
| docs/native.md | 修正原生模块 debug 构建命令为 pnpm build:native --dev。 |
| docs/contributing.md | 同步贡献指南中对 build:native 参数示例的修正。 |
| CLAUDE.md | 修正文档中 pnpm build:native debug 参数写法。 |
| AGENTS.md | 修正文档中 pnpm build:native debug 参数写法。 |
| .github/workflows/release.yml | 修正 release 工作流中各平台/架构打包命令的参数写法,确保架构参数生效。 |
| .github/workflows/dev.yml | 修正 dev 构建工作流中的打包命令参数写法,确保架构参数生效。 |
roarrabbit
pushed a commit
to roarrabbit/SPlayer-Next
that referenced
this pull request
Aug 27, 2026
将 `pnpm build:xxx -- --<arch>` 修正为 `pnpm build:xxx --<arch>`;将 `pnpm build:native -- --dev` 修正为 `pnpm build:native --dev`。前者会直接忽略架构参数,后者因为目前的参数解析逻辑简单所以没有区别 pnpm 自 v7 开始,将 `pnpm run <script>` 后的任何参数都添加到执行的脚本中而不需要 `--`
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.
将
pnpm build:xxx -- --<arch>修正为pnpm build:xxx --<arch>;将pnpm build:native -- --dev修正为pnpm build:native --dev。前者会直接忽略架构参数,后者因为目前的参数解析逻辑简单所以没有区别pnpm 自 v7 开始,将
pnpm run <script>后的任何参数都添加到执行的脚本中而不需要--(文档) (更新说明)我执行了以下操作来筛选出所有使用了这一特性的命令,并修正