fix: support versioned node binaries (e.g., node-22)
Fedora and some other distros install Node.js with a version suffix
(e.g., /usr/bin/node-22) and create a symlink from /usr/bin/node.
When Node resolves process.execPath, it returns the real binary path,
not the symlink, causing buildParseArgv to fail the looksLikeNode check.
This adds executable.startsWith('node-') to handle versioned binaries.
Fixes #2442
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
58b96ca0c0
commit
c95072fc26
@@ -99,6 +99,7 @@ export function buildParseArgv(params: {
|
||||
normalizedArgv.length >= 2 &&
|
||||
(executable === "node" ||
|
||||
executable === "node.exe" ||
|
||||
executable.startsWith("node-") ||
|
||||
executable === "bun" ||
|
||||
executable === "bun.exe");
|
||||
if (looksLikeNode) return normalizedArgv;
|
||||
|
||||
Reference in New Issue
Block a user