Skip to content

Commit 86e61f4

Browse files
authored
fix: define a fallback editor (#802)
1 parent b30988a commit 86e61f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { platform } from 'node:os';
12
import which from 'which';
23

34
import { forceRunAsync } from './run.js';
@@ -62,5 +63,6 @@ export async function getEditor(options = {}) {
6263
}
6364
}
6465

65-
return process.env.VISUAL || process.env.EDITOR || null;
66+
return process.env.VISUAL || process.env.EDITOR ||
67+
(platform() === 'win32' ? 'notepad.exe' : 'vi');
6668
};

0 commit comments

Comments
 (0)