Fix crash when vim editor is not found in PATH on Windows (#22423)

Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
This commit is contained in:
Jyo
2026-04-02 23:10:19 +05:30
committed by GitHub
parent b80234aa3e
commit 08b926796c

View File

@@ -302,6 +302,10 @@ export async function openDiff(
if (isTerminalEditor(editor)) {
try {
if (!commandExists(diffCommand.command)) {
throw new Error(`Editor command not found: ${diffCommand.command}`);
}
const result = spawnSync(diffCommand.command, diffCommand.args, {
stdio: 'inherit',
});