mirror of
https://github.com/openai/codex.git
synced 2026-04-25 23:24:55 +00:00
feat: honor /etc/codex/config.toml (#8461)
This adds logic to load `/etc/codex/config.toml` and associate it with `ConfigLayerSource::System` on UNIX. I refactored the code so it shares logic with the creation of the `ConfigLayerSource::User` layer.
This commit is contained in:
@@ -119,9 +119,10 @@ 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, 0,
|
||||
"managed config layer should be absent when file missing"
|
||||
num_system_layers, expected_system_layers,
|
||||
"system layer should be present only on unix"
|
||||
);
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
|
||||
Reference in New Issue
Block a user