We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0bb107 commit cc00012Copy full SHA for cc00012
lib_dev/process.js
@@ -1,8 +1,14 @@
1
import * as child_process from "node:child_process";
2
import * as fs from "node:fs/promises";
3
import * as path from "node:path";
4
+import { execPath } from "node:process";
5
import { bsc_exe, rescript_legacy_exe } from "#cli/bins";
6
7
+const npmCli = path.join(
8
+ path.dirname(execPath),
9
+ "../lib/node_modules/npm/bin/npm-cli.js",
10
+);
11
+
12
/**
13
* @typedef {{
14
* throwOnFail?: boolean,
@@ -265,7 +271,7 @@ export function setup(cwd = process.cwd()) {
265
271
* @return {Promise<ExecResult>}
266
272
*/
267
273
npm(args = [], options = {}) {
268
- return exec("npm", args, options);
274
+ return exec(execPath, [npmCli, ...args], options);
269
275
},
270
276
};
277
}
0 commit comments