Skip to content

Commit e0daf86

Browse files
committed
Use execPath
1 parent 432dc25 commit e0daf86

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib_dev/process.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,9 @@ export function setup(cwd = process.cwd()) {
292292
*/
293293
npm(args = [], options = {}) {
294294
console.log("the options", options);
295-
return exec(
296-
// "/opt/hostedtoolcache/node/22.19.0/x64/bin/node",
297-
"npm",
298-
args,
299-
options,
300-
);
295+
// Always invoke npm via the current Node.js executable to avoid PATH/resolution issues
296+
// on different runners or when using Bun to execute this script.
297+
return exec(execPath, [npmCli, ...args], options);
301298
},
302299
};
303300
}

0 commit comments

Comments
 (0)