ci: drop the -- separator when forwarding args through pnpm run - #388
Merged
Conversation
npm and pnpm disagree on `npm/pnpm run <script> -- <args>`: npm swallows the separator and appends only the args, pnpm appends the separator verbatim. The migration in #381 rewrote these call sites mechanically, so the `--` started leaking into the scripts' own argv. For `packages/ferric-example` this is a hard failure — the script is `ferric build`, so it ran as `ferric build -- --android`, commander read `--` as the options terminator and `--android` became a positional operand of a subcommand that takes none: error: too many arguments for 'build'. Expected 0 arguments but got 1. For the `test:*:allTests` scripts (which end in `-- ` so `node --run` forwards to the inner script) it is subtler: the extra separator survives as a literal `--` in the forwarded args, ahead of `--mode Release`. Dropping the separator restores exactly the argv these steps had under npm. This only shows up on PRs labeled "Android 🤖": test-android is gated to those while the self-hosted runner is offline (#379), so nothing had exercised the Android lane since #381 landed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kraenhansen
marked this pull request as ready for review
August 9, 2026 19:43
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.
The Android lane has been broken since the pnpm migration (#381). Surfaced by CI on #372, which is the first run to carry the
Android 🤖label since then.Root cause
npm and pnpm disagree on
run <script> -- <args>:npm run build -- --androidferric build --androidpnpm run build -- --androidferric build -- --androidnpm swallows the separator and appends only the args; pnpm appends the separator verbatim. #381 rewrote these call sites mechanically (
npm run→pnpm run), so the--started leaking into each script's own argv.Impact
packages/ferric-example— hard failure. The script isferric build, so it ran asferric build -- --android. Commander reads--as the options terminator,--androidbecomes a positional operand, andbuildCommanddeclares only options and zero arguments:--androidis a perfectly valid option (androidTarget) — it just never gets parsed as one.test:*:allTests— subtler. These scripts end in--(required, sonode --runforwards to the inner script), so the extra separator survives as a literal--sitting ahead of--mode Releasein the forwarded args, which then feedsconcurrently's{@}placeholder.Fix
Drop the separator at the three call sites in
check.yml(two live, one commented-out iOS TODO). Verified against Node 24 / pnpm 10 that this reproduces exactly the argv these steps had under npm:(where
outer_dashisnode --run inner --, mirroringtest:android:allTests)And against the real CLI, reproducing the CI failure locally and confirming the fix parses:
Why this wasn't caught
test-androidis gated toif: contains(github.event.pull_request.labels.*.name, 'Android 🤖')— added in c77f968 because the self-hosted runner was offline and the job would otherwise queue forever on main pushes (tracked in #379). So the Android lane hasn't run since #381 landed.Test plan
Android 🤖label, so Test app (Android) runs here: the "Build ferric-example for all architectures" step should get past the argument error, and the emulator step should then run in Release mode.Note the iOS Release line is still commented out — that TODO is untouched beyond the separator.
Generated by Claude Code