This commit is contained in:
decolua 2026-04-06 17:32:44 +07:00
parent 7db4b9834e
commit 307be3b63d
18 changed files with 406 additions and 179 deletions

View file

@ -16,15 +16,23 @@ const getClaudeSettingsPath = () => {
};
// Check if claude CLI is installed
// Check if claude CLI is installed (via which/where or config file exists)
const checkClaudeInstalled = async () => {
try {
const isWindows = os.platform() === "win32";
const command = isWindows ? "where claude" : "command -v claude";
await execAsync(command, { windowsHide: true });
const command = isWindows ? "where claude" : "which claude";
const env = isWindows
? { ...process.env, PATH: `${process.env.APPDATA}\\npm;${process.env.PATH}` }
: process.env;
await execAsync(command, { windowsHide: true, env });
return true;
} catch {
return false;
try {
await fs.access(getClaudeSettingsPath());
return true;
} catch {
return false;
}
}
};