@endo-ui/license 1.1.0 → 1.1.1
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/bin/core-install.js +8 -2
- package/package.json +1 -1
package/bin/core-install.js
CHANGED
|
@@ -11,11 +11,17 @@ export function npmInstallFailure(specification, exitCode, stderr, npmToken, sig
|
|
|
11
11
|
`Reason:\n${reason}`);
|
|
12
12
|
}
|
|
13
13
|
export async function installCore(cwd = process.cwd(), version, npmToken) {
|
|
14
|
-
const
|
|
14
|
+
const isWindows = process.platform === "win32";
|
|
15
|
+
const command = isWindows
|
|
16
|
+
? process.env["ComSpec"] ?? "cmd.exe"
|
|
17
|
+
: "npm";
|
|
15
18
|
await new Promise((resolve, reject) => {
|
|
16
19
|
const specification = version ? `@endo-ui/core@${version}` : "@endo-ui/core";
|
|
20
|
+
const args = isWindows
|
|
21
|
+
? ["/d", "/s", "/c", "npm", "install", specification]
|
|
22
|
+
: ["install", specification];
|
|
17
23
|
let stderr = "";
|
|
18
|
-
const child = spawn(command,
|
|
24
|
+
const child = spawn(command, args, {
|
|
19
25
|
cwd,
|
|
20
26
|
env: {
|
|
21
27
|
...process.env,
|