create-krispya 0.4.3 → 0.4.4
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/cli.cjs +6 -2
- package/dist/cli.mjs +6 -2
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -383,10 +383,14 @@ async function promptForOptions(name) {
|
|
|
383
383
|
}
|
|
384
384
|
function openInEditor(editor, path) {
|
|
385
385
|
return new Promise((resolve, reject) => {
|
|
386
|
-
const
|
|
386
|
+
const isWindows = process.platform === "win32";
|
|
387
|
+
const child = isWindows ? child_process.spawn(`${editor} "${path}"`, {
|
|
387
388
|
detached: true,
|
|
388
389
|
stdio: "ignore",
|
|
389
|
-
shell:
|
|
390
|
+
shell: true
|
|
391
|
+
}) : child_process.spawn(editor, [path], {
|
|
392
|
+
detached: true,
|
|
393
|
+
stdio: "ignore"
|
|
390
394
|
});
|
|
391
395
|
child.on("error", reject);
|
|
392
396
|
child.unref();
|
package/dist/cli.mjs
CHANGED
|
@@ -363,10 +363,14 @@ async function promptForOptions(name) {
|
|
|
363
363
|
}
|
|
364
364
|
function openInEditor(editor, path) {
|
|
365
365
|
return new Promise((resolve, reject) => {
|
|
366
|
-
const
|
|
366
|
+
const isWindows = process.platform === "win32";
|
|
367
|
+
const child = isWindows ? spawn(`${editor} "${path}"`, {
|
|
367
368
|
detached: true,
|
|
368
369
|
stdio: "ignore",
|
|
369
|
-
shell:
|
|
370
|
+
shell: true
|
|
371
|
+
}) : spawn(editor, [path], {
|
|
372
|
+
detached: true,
|
|
373
|
+
stdio: "ignore"
|
|
370
374
|
});
|
|
371
375
|
child.on("error", reject);
|
|
372
376
|
child.unref();
|