@auroraflow/code 0.0.13 → 0.0.14
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/package.json
CHANGED
|
@@ -254,22 +254,11 @@ function windowsCommandSpec(command, args) {
|
|
|
254
254
|
return { command, args, shell: false };
|
|
255
255
|
}
|
|
256
256
|
// Windows npm global bins are .cmd shims, commonly under "C:\Program Files".
|
|
257
|
-
//
|
|
258
|
-
//
|
|
259
|
-
// one quoted command line so paths with spaces survive.
|
|
257
|
+
// Invoke the batch file through cmd.exe + call so cmd receives the script
|
|
258
|
+
// path as an argv item instead of reparsing one pre-quoted command string.
|
|
260
259
|
return {
|
|
261
260
|
command: process.env.ComSpec || "cmd.exe",
|
|
262
|
-
args: ["/d", "/
|
|
261
|
+
args: ["/d", "/c", "call", command, ...args],
|
|
263
262
|
shell: false
|
|
264
263
|
};
|
|
265
264
|
}
|
|
266
|
-
|
|
267
|
-
function windowsCmdLine(parts) {
|
|
268
|
-
return parts.map(windowsCmdQuote).join(" ");
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
function windowsCmdQuote(value) {
|
|
272
|
-
const text = String(value);
|
|
273
|
-
if (/^[A-Za-z0-9_./:=+-]+$/.test(text)) return text;
|
|
274
|
-
return `"${text.replace(/"/g, '""')}"`;
|
|
275
|
-
}
|