fix: use dot-sourcing instead of child PowerShell process

powershell -File runs script in child process — PATH changes don't
persist. Changed to Set-ExecutionPolicy + dot-sourcing (. script.ps1)
which runs in current session. Also added PATH restart hint to Codex
install/update scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
delta-cloud-208e
2026-03-08 08:08:42 +00:00
parent 9f26c53ece
commit b7a335b409
3 changed files with 27 additions and 12 deletions

View File

@@ -234,3 +234,6 @@ try {
}
Write-Host ""
Write-Host " NOTE: If 'codex' is not recognized, restart PowerShell or run:" -ForegroundColor Yellow
Write-Host ' $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")' -ForegroundColor Yellow
Write-Host ""