Conversation
#239 prepended `dirname(process.execPath)` to PATH so npm's `#!/usr/bin/env node` shebang resolves on GHE self-hosted runners where node isn't on PATH. But on runners with a prior `setup-node` step, this shadowed the user's installed toolchain with the runner-bundled node (e.g. externals/node24/bin), pairing the user's npm with a mismatched node — or picking up a broken `npm` shipped next to the runner-bundled node. Append instead so a user-installed toolchain on PATH keeps precedence; the runner's node dir remains as a fallback for the original #234 case where node isn't on PATH at all. Fixes #240
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-file fix changes how pnpm-action adds its Node directory to PATH: appending instead of prepending it to preserve any pre-existing Node toolchain precedence (e.g., from prior setup steps), resolving conflicts on GHE runners with bundled Node versions. ChangesPATH Precedence Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
Summary
dirname(process.execPath)to the child PATH so npm's#!/usr/bin/env nodeshebang could find node on GHE self-hosted runners where node isn't on PATH.setup-node-equivalent step, that prepend shadows the user-installed toolchain with the runner-bundled node (e.g.externals/node24/bin/), pairing the user's npm with a mismatched node — or picking up a brokennpmthat ships next to the runner-bundled node.npmdoes not exist on the runner (GHE) #234 case where node isn't on PATH at all.Fixes #240
Test plan
setup-node(Node v22 + matched npm) → bootstrap uses the user's node/npm, no module-resolution errorsnpmdoes not exist on the runner (GHE) #234 scenario) → bootstrap still works via the appended node dirSummary by CodeRabbit