mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-09 03:22:40 +00:00
fix(scripts): run npm cli with active node
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user