mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
fix: prepend Windows Codex install dir on PATH
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user