fix(scripts): run npm cli with active node

This commit is contained in:
Vincent Koc
2026-06-20 09:19:26 +02:00
parent 3a1e49dbaa
commit 22f696d010
2 changed files with 24 additions and 4 deletions

View File

@@ -11,10 +11,7 @@ function resolveToolchainNpmRunner(params) {
const npmCliPath = npmCliCandidates.find((candidate) => params.existsSync(candidate));
if (npmCliPath) {
return {
command:
params.platform === "win32"
? params.pathImpl.join(params.nodeDir, "node.exe")
: params.pathImpl.join(params.nodeDir, "node"),
command: params.execPath,
args: [npmCliPath, ...params.npmArgs],
shell: false,
};
@@ -57,6 +54,7 @@ export function resolveNpmRunner(params = {}) {
const npmToolchain = resolveToolchainNpmRunner({
comSpec,
existsSync,
execPath,
nodeDir,
npmArgs,
pathImpl,