mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-05 20:45:45 +08:00
feat: add "claude" as fallback in the cli path
This commit is contained in:
@@ -153,9 +153,11 @@ function mapCliOptionsToSDK(options = {}) {
|
|||||||
// Since SDK 0.2.113, options.env replaces process.env instead of overlaying it.
|
// Since SDK 0.2.113, options.env replaces process.env instead of overlaying it.
|
||||||
sdkOptions.env = { ...process.env };
|
sdkOptions.env = { ...process.env };
|
||||||
|
|
||||||
if (process.env.CLAUDE_CLI_PATH) {
|
// Use CLAUDE_CLI_PATH if explicitly set, otherwise fall back to 'claude' on PATH.
|
||||||
sdkOptions.pathToClaudeCodeExecutable = process.env.CLAUDE_CLI_PATH;
|
// The SDK 0.2.113+ looks for a bundled native binary optional dep by default;
|
||||||
}
|
// this fallback ensures users who installed via the official installer still work
|
||||||
|
// even when npm prune --production has removed those optional deps.
|
||||||
|
sdkOptions.pathToClaudeCodeExecutable = process.env.CLAUDE_CLI_PATH || 'claude';
|
||||||
|
|
||||||
// Map working directory
|
// Map working directory
|
||||||
if (cwd) {
|
if (cwd) {
|
||||||
|
|||||||
Reference in New Issue
Block a user