diff --git a/src/lib/claude-client.ts b/src/lib/claude-client.ts index bcf63ed..a081f42 100644 --- a/src/lib/claude-client.ts +++ b/src/lib/claude-client.ts @@ -18,7 +18,7 @@ import type { import type { ClaudeStreamOptions, SSEEvent, TokenUsage, MCPServerConfig, PermissionRequestEvent } from '@/types'; import { registerPendingPermission } from './permission-registry'; import { getSetting, getActiveProvider } from './db'; -import { findClaudeBinary, getExpandedPath } from './platform'; +import { findClaudeBinary, findGitBash, getExpandedPath } from './platform'; import os from 'os'; let cachedClaudePath: string | null | undefined; @@ -157,6 +157,14 @@ export function streamClaude(options: ClaudeStreamOptions): ReadableStream\cmd\git.exe or \bin\git.exe + const gitDir = path.dirname(path.dirname(gitExe)); + const bashPath = path.join(gitDir, 'bin', 'bash.exe'); + if (fs.existsSync(bashPath)) { + return bashPath; + } + } + } catch { + // where git failed or timed out + } + + return null; +}