fix(codex): write config to ~/.codex/ not %APPDATA%\codex\
Codex CLI reads config from %USERPROFILE%\.codex\config.toml but PowerShell fallback was writing to %APPDATA%\codex\config.toml. Old broken config remained in ~/.codex/ causing TOML parse errors. - Fix config path: $env:APPDATA\codex → $env:USERPROFILE\.codex - Add cleanup step to remove broken config before patching - Remove old config before writing new one Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -132,9 +132,12 @@ if ($pyCmd) {
|
||||
|
||||
if (-not $pyCmd) {
|
||||
Write-Host " Applying patches (PowerShell)..." -ForegroundColor Cyan
|
||||
$configDir = "$env:APPDATA\codex"
|
||||
# Codex reads config from ~/.codex/ (NOT %APPDATA%\codex\)
|
||||
$configDir = "$env:USERPROFILE\.codex"
|
||||
New-Item -ItemType Directory -Force -Path $configDir | Out-Null
|
||||
$configToml = Join-Path $configDir "config.toml"
|
||||
# Remove old broken config
|
||||
if (Test-Path $configToml) { Remove-Item $configToml -Force -ErrorAction SilentlyContinue }
|
||||
$tomlContent = @"
|
||||
model = "gpt-5.4"
|
||||
model_reasoning_effort = "high"
|
||||
|
||||
Reference in New Issue
Block a user