mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
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:
@@ -302,6 +302,10 @@ export async function openDiff(
|
|||||||
|
|
||||||
if (isTerminalEditor(editor)) {
|
if (isTerminalEditor(editor)) {
|
||||||
try {
|
try {
|
||||||
|
if (!commandExists(diffCommand.command)) {
|
||||||
|
throw new Error(`Editor command not found: ${diffCommand.command}`);
|
||||||
|
}
|
||||||
|
|
||||||
const result = spawnSync(diffCommand.command, diffCommand.args, {
|
const result = spawnSync(diffCommand.command, diffCommand.args, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user