Skip to content

Commit ef6788b

Browse files
committed
fix(ci): use pnpm filter instead of -- to pass --shard arg
The `pnpm script -- --shard=1/3` syntax passes `--` through to the script, causing parseArgs to treat `--shard` as a positional (filter) instead of an option. Use `pnpm -F ./packages/cli` to run scripts directly, which passes args without the `--` separator.
1 parent e54c73a commit ef6788b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,8 @@ jobs:
654654
655655
- name: Run CLI snapshot tests (shard ${{ matrix.shard }}/${{ matrix.shardTotal }})
656656
run: |
657-
cd packages/cli
658-
RUST_BACKTRACE=1 pnpm snap-test-local -- --shard=${{ matrix.shard }}/${{ matrix.shardTotal }}
659-
RUST_BACKTRACE=1 pnpm snap-test-global -- --shard=${{ matrix.shard }}/${{ matrix.shardTotal }}
657+
RUST_BACKTRACE=1 pnpm -F ./packages/cli snap-test-local --shard=${{ matrix.shard }}/${{ matrix.shardTotal }}
658+
RUST_BACKTRACE=1 pnpm -F ./packages/cli snap-test-global --shard=${{ matrix.shard }}/${{ matrix.shardTotal }}
660659
if ! git diff --quiet; then
661660
echo "::error::Snapshot diff detected. Run 'pnpm -F vite-plus snap-test' locally and commit the updated snap.txt files."
662661
git diff --stat

0 commit comments

Comments
 (0)