@nowcrew/daemon 0.6.97-beta.12 → 0.6.97-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/npm-command.js +5 -5
- package/package.json +1 -1
package/dist/npm-command.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { posix, win32 } from "node:path";
|
|
2
|
-
/** Execute
|
|
2
|
+
/** Execute npm through its owning Node binary so PATH and cmd.exe quoting are irrelevant. */
|
|
3
3
|
export function npmInvocation(platform, nodePath = process.execPath) {
|
|
4
4
|
const paths = platform === "win32" ? win32 : posix;
|
|
5
|
-
const npmPath =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const npmPath = platform === "win32"
|
|
6
|
+
? paths.join(paths.dirname(nodePath), "node_modules", "npm", "bin", "npm-cli.js")
|
|
7
|
+
: paths.join(paths.dirname(nodePath), "npm");
|
|
8
|
+
return { command: nodePath, argsPrefix: [npmPath] };
|
|
9
9
|
}
|