Fix the OSArchitecture retrieval in powershell install
Open 💬 0 comments Opened Jun 9, 2026 by z-a-f
PowerShell architecture system var is fragile. On some versions the install is broken. There is a simple change proposed by @thedwindlingdba in #20782. This will also fix #19559
...
$architecture = [System.Runtime.InteropServices.RuntimeInformation,mscorlib]::OSArchitecture.ToString().ToLower()
...
switch($architecture) {
"arm64" { ... }
"x64" { ... }
}
These lines should change (or open the repo for external PRs): https://github.com/openai/codex/blob/a71e040df51ec0e1f5523bf0ff5f1bef39858128/scripts/install/install.ps1#L710-L729