fix: prepend Windows Codex install dir on PATH

This commit is contained in:
Edward Frazer
2026-03-02 16:16:09 -08:00
parent 5edcaa30a5
commit 2aefe439be

View File

@@ -166,12 +166,16 @@ if (-not (Path-Contains -PathValue $userPath -Entry $installDir)) {
if ([string]::IsNullOrWhiteSpace($userPath)) {
$newUserPath = $installDir
} else {
$newUserPath = "$userPath;$installDir"
$newUserPath = "$installDir;$userPath"
}
[Environment]::SetEnvironmentVariable("Path", $newUserPath, "User")
if (-not (Path-Contains -PathValue $env:Path -Entry $installDir)) {
$env:Path = "$env:Path;$installDir"
if ([string]::IsNullOrWhiteSpace($env:Path)) {
$env:Path = $installDir
} else {
$env:Path = "$installDir;$env:Path"
}
}
Write-Step "PATH updated for future PowerShell sessions."
$pathNeedsNewShell = $true