mirror of
https://github.com/musistudio/claude-code-router.git
synced 2026-05-08 01:37:05 +00:00
fix(utils): use || instead of ?? for CLAUDE_PATH
The previous null‑ish coalescing treated empty strings as a valid value, which could result in an invalid path. Switching to logical OR keeps the precedence (config > env) but now falls back to the default `claude`
This commit is contained in:
parent
6a4c1f7591
commit
ac0263b226
1 changed files with 1 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ export async function executeCodeCommand(args: string[] = []) {
|
|||
incrementReferenceCount();
|
||||
|
||||
// Execute claude command
|
||||
const claudePath = config?.CLAUDE_PATH ?? process.env.CLAUDE_PATH ?? "claude";
|
||||
const claudePath = config?.CLAUDE_PATH || process.env.CLAUDE_PATH || "claude";
|
||||
|
||||
// Properly join arguments to preserve spaces in quotes
|
||||
// Wrap each argument in double quotes to preserve single and double quotes inside arguments
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue