mirror of
https://github.com/pnpm/action-setup.git
synced 2026-05-07 09:20:37 +08:00
fix: append (not prepend) action node dir to PATH for npm bootstrap
#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
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user