Load requirements on windows (#10770)

We support requirements on Unix, loading from
`/etc/codex/requirements.toml`. On MacOS, we also support MDM.

Now, on Windows, we'll load requirements from
`%ProgramData%\OpenAI\Codex\requirements.toml`
This commit is contained in:
gt-oai
2026-02-09 16:05:38 +00:00
committed by GitHub
parent 54b401aa5f
commit 9fe925b15a
9 changed files with 209 additions and 123 deletions

View File

@@ -286,10 +286,9 @@ async fn returns_empty_when_all_layers_missing() {
.iter()
.filter(|layer| matches!(layer.name, super::ConfigLayerSource::System { .. }))
.count();
let expected_system_layers = if cfg!(unix) { 1 } else { 0 };
assert_eq!(
num_system_layers, expected_system_layers,
"system layer should be present only on unix"
num_system_layers, 1,
"system layer should always be present"
);
#[cfg(not(target_os = "macos"))]