diff options
Diffstat (limited to 'packages/core/src/utils/editor.ts')
| -rw-r--r-- | packages/core/src/utils/editor.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/core/src/utils/editor.ts b/packages/core/src/utils/editor.ts index 6f65d8da..447aa0d2 100644 --- a/packages/core/src/utils/editor.ts +++ b/packages/core/src/utils/editor.ts @@ -13,16 +13,16 @@ interface DiffCommand { args: string[]; } -export function checkHasEditor(editor: EditorType): boolean { - const commandExists = (cmd: string): boolean => { - try { - execSync(`which ${cmd}`, { stdio: 'ignore' }); - return true; - } catch { - return false; - } - }; +function commandExists(cmd: string): boolean { + try { + execSync(`which ${cmd}`, { stdio: 'ignore' }); + return true; + } catch { + return false; + } +} +export function checkHasEditor(editor: EditorType): boolean { if (editor === 'vscode') { return commandExists('code'); } else if (editor === 'vim') { |
