Skip to content

Commit 139285a

Browse files
committed
ci(repo): use working-directory for baseline worktree steps
pnpm 10 mishandles `pnpm --dir <path> <non-builtin> ...`, treating the path as the command to execute and erroring with ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL. Switching the worktree-fallback install/build/snapshot steps to GHA's `working-directory:` avoids the flag entirely.
1 parent 4454275 commit 139285a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/api-changes.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,19 @@ jobs:
134134
135135
- name: Install baseline dependencies
136136
if: steps.baseline-cache.outputs.cache-matched-key == ''
137-
run: pnpm --dir .worktrees/snapi-baseline install --frozen-lockfile
137+
working-directory: .worktrees/snapi-baseline
138+
run: pnpm install --frozen-lockfile
138139

139140
- name: Build baseline declarations
140141
if: steps.baseline-cache.outputs.cache-matched-key == ''
141-
run: pnpm --dir .worktrees/snapi-baseline turbo build:declarations $TURBO_ARGS $SNAPI_FILTERS
142+
working-directory: .worktrees/snapi-baseline
143+
run: pnpm turbo build:declarations $TURBO_ARGS $SNAPI_FILTERS
142144

143145
- name: Generate baseline API snapshots
144146
if: steps.baseline-cache.outputs.cache-matched-key == ''
147+
working-directory: .worktrees/snapi-baseline
145148
run: |
146-
pnpm --dir .worktrees/snapi-baseline dlx --package "$SNAPI_PACKAGE" snapi snapshot \
149+
pnpm dlx --package "$SNAPI_PACKAGE" snapi snapshot \
147150
--output "$GITHUB_WORKSPACE/.api-snapshots-baseline"
148151
149152
- name: Detect API changes

0 commit comments

Comments
 (0)