create-krispya 0.4.5 → 0.4.7
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 +4 -2
- package/dist/cli.mjs +4 -2
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -384,11 +384,13 @@ async function promptForOptions(name) {
|
|
|
384
384
|
function openInEditor(editor, path) {
|
|
385
385
|
return new Promise((resolve, reject) => {
|
|
386
386
|
const isWindows = process.platform === "win32";
|
|
387
|
-
const
|
|
387
|
+
const reuseWindow = (editor === "cursor" || editor === "code") && process.env.TERM_PROGRAM === "vscode";
|
|
388
|
+
const args = reuseWindow ? ["-r", path] : [path];
|
|
389
|
+
const child = isWindows ? child_process.spawn(`${editor} ${reuseWindow ? "-r " : ""}"${path}"`, {
|
|
388
390
|
detached: true,
|
|
389
391
|
stdio: "ignore",
|
|
390
392
|
shell: true
|
|
391
|
-
}) : child_process.spawn(editor,
|
|
393
|
+
}) : child_process.spawn(editor, args, {
|
|
392
394
|
detached: true,
|
|
393
395
|
stdio: "ignore"
|
|
394
396
|
});
|
package/dist/cli.mjs
CHANGED
|
@@ -364,11 +364,13 @@ async function promptForOptions(name) {
|
|
|
364
364
|
function openInEditor(editor, path) {
|
|
365
365
|
return new Promise((resolve, reject) => {
|
|
366
366
|
const isWindows = process.platform === "win32";
|
|
367
|
-
const
|
|
367
|
+
const reuseWindow = (editor === "cursor" || editor === "code") && process.env.TERM_PROGRAM === "vscode";
|
|
368
|
+
const args = reuseWindow ? ["-r", path] : [path];
|
|
369
|
+
const child = isWindows ? spawn(`${editor} ${reuseWindow ? "-r " : ""}"${path}"`, {
|
|
368
370
|
detached: true,
|
|
369
371
|
stdio: "ignore",
|
|
370
372
|
shell: true
|
|
371
|
-
}) : spawn(editor,
|
|
373
|
+
}) : spawn(editor, args, {
|
|
372
374
|
detached: true,
|
|
373
375
|
stdio: "ignore"
|
|
374
376
|
});
|