From 574cd117b272f709dc719bf45bf144cb9882c65e Mon Sep 17 00:00:00 2001 From: tallinn102 <152943381+tallinn102@users.noreply.github.com> Date: Tue, 6 Jan 2026 20:39:14 +1000 Subject: [PATCH] fix: pass augmented env to Claude CLI validation on macOS (#640) When Electron apps launch from Finder/Dock on macOS, they don't inherit the user's shell PATH. This causes Claude CLI detection to fail because the `claude` script (which uses `#!/usr/bin/env node`) cannot find the Node.js binary. The fix passes `getAugmentedEnv()` to `execFileSync` in `validateClaude()`, which includes `/opt/homebrew/bin` and other common binary locations in the PATH. This allows `env node` to find Node.js when validating the Claude CLI. Fixes an issue where Auto Claude would report "Claude CLI not found" even though it was properly installed via npm. Signed-off-by: Tallinn Terlich Co-authored-by: Andy <119136210+AndyMik90@users.noreply.github.com> --- apps/frontend/src/main/cli-tool-manager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/main/cli-tool-manager.ts b/apps/frontend/src/main/cli-tool-manager.ts index 4334d27e..6e6403c5 100644 --- a/apps/frontend/src/main/cli-tool-manager.ts +++ b/apps/frontend/src/main/cli-tool-manager.ts @@ -25,7 +25,7 @@ import { existsSync, readdirSync } from 'fs'; import path from 'path'; import os from 'os'; import { app } from 'electron'; -import { findExecutable } from './env-utils'; +import { findExecutable, getAugmentedEnv } from './env-utils'; import type { ToolDetectionResult } from '../shared/types'; import { findHomebrewPython as findHomebrewPythonUtil } from './utils/homebrew-python'; import { @@ -841,6 +841,7 @@ class CLIToolManager { timeout: 5000, windowsHide: true, shell: needsShell, + env: getAugmentedEnv(), }).trim(); // Claude CLI version output format: "claude-code version X.Y.Z" or similar