mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(cli): use getDefaultClaudeCodePath() in claudeRemote (#218)
Replace hardcoded 'claude' string with getDefaultClaudeCodePath() to ensure the correct Claude Code executable path is resolved, consistent with claudeLocal.ts. This respects HAPI_CLAUDE_PATH env var and finds the global claude installation path properly.
This commit is contained in:
@@ -10,6 +10,7 @@ import { awaitFileExist } from "@/modules/watcher/awaitFileExist";
|
||||
import { systemPrompt } from "./utils/systemPrompt";
|
||||
import { PermissionResult } from "./sdk/types";
|
||||
import { getHapiBlobsDir } from "@/constants/uploadPaths";
|
||||
import { getDefaultClaudeCodePath } from "./sdk/utils";
|
||||
|
||||
export async function claudeRemote(opts: {
|
||||
|
||||
@@ -122,7 +123,7 @@ export async function claudeRemote(opts: {
|
||||
disallowedTools: initial.mode.disallowedTools,
|
||||
canCallTool: (toolName: string, input: unknown, options: { signal: AbortSignal }) => opts.canCallTool(toolName, input, mode, options),
|
||||
abort: opts.signal,
|
||||
pathToClaudeCodeExecutable: 'claude',
|
||||
pathToClaudeCodeExecutable: getDefaultClaudeCodePath(),
|
||||
settingsPath: opts.hookSettingsPath,
|
||||
additionalDirectories: [getHapiBlobsDir()],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user