Skip to content

Commit

Permalink
fix: define a fallback editor (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored May 11, 2024
1 parent b30988a commit 86e61f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { platform } from 'node:os';
import which from 'which';

import { forceRunAsync } from './run.js';
Expand Down Expand Up @@ -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');
};

0 comments on commit 86e61f4

Please sign in to comment.