Skip to content

Commit 42e75a1

Browse files
committed
fix: resolve npm by absolute path; guard against unset PATH
Follow-up to 5a9e198. Two refinements to the GHE self-hosted runner fix: - Spawn npm via `path.join(dirname(process.execPath), 'npm[.cmd]')` instead of relying on PATH lookup. This matches the original PR description and is robust against PATH-shadowed npm installations. - Avoid `"<dir>:undefined"` leaking into PATH when `process.env.PATH` is unset (rare, but possible in stripped environments). PATH still has the node directory prepended so npm's `#!/usr/bin/env node` shebang can resolve node on Linux/macOS.
1 parent 5a9e198 commit 42e75a1

2 files changed

Lines changed: 158 additions & 151 deletions

File tree

0 commit comments

Comments
 (0)