diff --git a/packages/core/src/utils/editor.ts b/packages/core/src/utils/editor.ts index 29dc78fc49..dfec446433 100644 --- a/packages/core/src/utils/editor.ts +++ b/packages/core/src/utils/editor.ts @@ -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', });