Skip to content

Commit 4245391

Browse files
zoidbergclawdclaude
andcommitted
Fix CLAUDE_CODE_GIT_BASH_PATH not set when using bundled MinGit
The v0.2.6 refactor checked hasCommand('bash') AFTER adding MinGit to PATH. Since MinGit's bash.exe was now discoverable via PATH, the check returned true and we skipped setting CLAUDE_CODE_GIT_BASH_PATH. But Claude Code doesn't discover bash via PATH -- it needs the explicit env var. Fix: set CLAUDE_CODE_GIT_BASH_PATH directly when setting up MinGit. Remove the broken separate hasCommand('bash') check. Bump version to 0.2.8. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f4bfa88 commit 4245391

4 files changed

Lines changed: 7 additions & 13 deletions

File tree

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "elisa-backend",
3-
"version": "0.2.7",
3+
"version": "0.2.8",
44
"private": true,
55
"license": "MIT",
66
"type": "module",

electron/main.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,27 +196,21 @@ async function startBackend(): Promise<void> {
196196
try { execSync(`where ${cmd}`, { stdio: 'ignore' }); return true; } catch { return false; }
197197
};
198198

199-
// Git + bash: use system Git if available, otherwise bundled MinGit
199+
// Git + bash: use system Git if available, otherwise bundled MinGit.
200+
// Claude Code requires CLAUDE_CODE_GIT_BASH_PATH explicitly -- it does
201+
// NOT discover bash via PATH. Always set it when using bundled MinGit.
200202
if (!hasCommand('git')) {
201203
const mingitDir = path.join(process.resourcesPath, 'mingit');
202204
const bashExe = path.join(mingitDir, 'usr', 'bin', 'bash.exe');
203205
if (fs.existsSync(bashExe)) {
204206
const gitCmd = path.join(mingitDir, 'cmd');
205207
const gitUsrBin = path.join(mingitDir, 'usr', 'bin');
206208
process.env.PATH = `${process.env.PATH};${gitCmd};${gitUsrBin}`;
209+
process.env.CLAUDE_CODE_GIT_BASH_PATH = bashExe;
207210
console.log('[main] Using bundled MinGit (no system git found)');
208211
}
209212
}
210213

211-
// Claude Code needs bash.exe. Set CLAUDE_CODE_GIT_BASH_PATH if not
212-
// already resolvable (system Git puts it in PATH automatically).
213-
if (!hasCommand('bash')) {
214-
const mingitBash = path.join(process.resourcesPath, 'mingit', 'usr', 'bin', 'bash.exe');
215-
if (fs.existsSync(mingitBash)) {
216-
process.env.CLAUDE_CODE_GIT_BASH_PATH = mingitBash;
217-
}
218-
}
219-
220214
// Node.js: use system node if available, otherwise create Electron shim.
221215
if (!hasCommand('node')) {
222216
const nodeShimDir = path.join(os.tmpdir(), 'elisa-node');

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "frontend",
33
"private": true,
4-
"version": "0.2.7",
4+
"version": "0.2.8",
55
"license": "MIT",
66
"type": "module",
77
"scripts": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "elisa",
3-
"version": "0.2.7",
3+
"version": "0.2.8",
44
"private": true,
55
"license": "MIT",
66
"author": "Elisa",

0 commit comments

Comments
 (0)