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 3f41eda commit 230cc6dCopy full SHA for 230cc6d
scripts/build-utils.mjs
@@ -5,6 +5,8 @@ import fs from "fs-extra"
5
import archiver from "archiver";
6
import glob from 'glob';
7
8
+const isWindows = /^win/.test(process.platform);
9
+
10
export const pkg = JSON.parse(fs.readFileSync("./package.json", 'utf8'));
11
12
export function rem(...lines) {
@@ -35,6 +37,10 @@ export async function rm(globPattern) {
35
37
36
38
export function exec(command, args = []) {
39
console.log(`EXEC ${command}${args.length ? ' ' + args.join(" ") : ''}`);
40
41
+ if (isWindows && command.toLowerCase() === "npx") {
42
+ command += ".cmd";
43
+ }
44
45
return new Promise((resolve, reject) => {
46
const child = spawn(command, args);
0 commit comments