From 2b03406f00134285ff660100911a085a50b4bfef Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Sun, 2 Nov 2025 02:39:02 -0500 Subject: [PATCH] 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" "$@" --- ccs.ps1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ccs.ps1 b/ccs.ps1 index 34382636..246ea2bf 100644 --- a/ccs.ps1 +++ b/ccs.ps1 @@ -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