mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
Preserve WINDIR in core Windows shell environments (#39809)
## What changed - Add `WINDIR` to the Windows core environment variable allowlist. - Extend the Windows core-inheritance test to verify that a case-variant `WinDir` entry is retained. GitOrigin-RevId: 0305d8fa882ba2705a7ce7661098cedac1339c43
This commit is contained in:
@@ -172,6 +172,7 @@ pub const WINDOWS_CORE_ENV_VARS: &[&str] = &[
|
||||
"SHELL",
|
||||
"COMSPEC",
|
||||
"SYSTEMROOT",
|
||||
"WINDIR",
|
||||
"SYSTEMDRIVE",
|
||||
// User context and profiles
|
||||
"USERNAME",
|
||||
@@ -218,6 +219,7 @@ mod windows_tests {
|
||||
let vars = make_vars(&[
|
||||
("Shell", "C:\\Program Files\\Git\\bin\\bash.exe"),
|
||||
("SystemRoot", "C:\\Windows"),
|
||||
("WinDir", "C:\\Windows"),
|
||||
("AppData", "C:\\Users\\codex\\AppData\\Roaming"),
|
||||
("TmpDir", "C:\\Temp\\custom"),
|
||||
("OPENAI_API_KEY", "secret"),
|
||||
@@ -237,6 +239,7 @@ mod windows_tests {
|
||||
"C:\\Program Files\\Git\\bin\\bash.exe".to_string(),
|
||||
),
|
||||
("SystemRoot".to_string(), "C:\\Windows".to_string()),
|
||||
("WinDir".to_string(), "C:\\Windows".to_string()),
|
||||
(
|
||||
"AppData".to_string(),
|
||||
"C:\\Users\\codex\\AppData\\Roaming".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user