Skip to content

Commit 1decb61

Browse files
committed
npmBin thing
1 parent 5209336 commit 1decb61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib_dev/process.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import * as child_process from "node:child_process";
22
import * as fs from "node:fs/promises";
33
import * as path from "node:path";
4+
import { execPath } from "node:process";
45
import { bsc_exe, rescript_legacy_exe } from "#cli/bins";
56

7+
const npmBin = path.join(path.dirname(execPath), "npm");
8+
69
/**
710
* @typedef {{
811
* throwOnFail?: boolean,
@@ -252,7 +255,7 @@ export function setup(cwd = process.cwd()) {
252255
* @return {Promise<ExecResult>}
253256
*/
254257
npm(args = [], options = {}) {
255-
return exec("npm", args, options);
258+
return exec(npmBin, args, options);
256259
},
257260
};
258261
}

0 commit comments

Comments
 (0)