diff --git a/lib/utils.js b/lib/utils.js index 366ece45..645f2833 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,3 +1,4 @@ +import { platform } from 'node:os'; import which from 'which'; import { forceRunAsync } from './run.js'; @@ -62,5 +63,6 @@ export async function getEditor(options = {}) { } } - return process.env.VISUAL || process.env.EDITOR || null; + return process.env.VISUAL || process.env.EDITOR || + (platform() === 'win32' ? 'notepad.exe' : 'vi'); };