mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 14:19:56 +00:00
fix(windows): use proper argument splatting for Claude CLI execution
The previous approach using: & claude $ClaudeArgs was not properly expanding the array, causing Claude CLI to see: error: unknown option '--settings C:\Users\kaidu\.ccs\sonnet.settings.json' Fixed by using direct splatting: & claude --settings $SettingsPath @RemainingArgs This ensures proper argument quoting and separation, matching bash behavior: exec claude --settings "$SETTINGS_PATH" "$@"
This commit is contained in:
@@ -84,12 +84,10 @@ if (-not (Test-Path $SettingsPath)) {
|
||||
}
|
||||
|
||||
# Execute claude with settings
|
||||
# Build argument array to pass all remaining arguments to Claude CLI
|
||||
$ClaudeArgs = @("--settings", $SettingsPath)
|
||||
# Pass arguments directly to Claude CLI with proper splatting
|
||||
if ($RemainingArgs) {
|
||||
$ClaudeArgs += $RemainingArgs
|
||||
& claude --settings $SettingsPath @RemainingArgs
|
||||
} else {
|
||||
& claude --settings $SettingsPath
|
||||
}
|
||||
|
||||
# Execute claude and preserve exit code
|
||||
& claude $ClaudeArgs
|
||||
exit $LASTEXITCODE
|
||||
|
||||
Reference in New Issue
Block a user