mirror of
https://github.com/openai/codex.git
synced 2026-11-20 23:08:21 +00:00
Add an override to skip project configuration (#38647)
## What changed - Add `LoaderOverrides::ignore_project_config` to bypass project-root discovery and all project configuration layers. - Keep other configuration sources, including session overrides and cloud configuration, active when the override is set. ## Testing - Add a config loader test that verifies project configuration is not loaded or parsed while session and cloud values remain effective. GitOrigin-RevId: b9aa44de526354fad6b900d6ae8d9b5fb8f700bb
This commit is contained in:
1 parent
cce33123a1
commit
b8aa9e9a01
3 files changed
+67
-1
No files matched your search
@@ -182,6 +182,7 @@ pub async fn load_config_layers_state(
|
||||
let active_user_profile = overrides.user_config_profile.clone();
|
||||
let ignore_managed_requirements = overrides.ignore_managed_requirements;
|
||||
let ignore_user_config = overrides.ignore_user_config;
|
||||
let ignore_project_config = overrides.ignore_project_config;
|
||||
let ignore_user_and_project_exec_policy_rules =
|
||||
overrides.ignore_user_and_project_exec_policy_rules;
|
||||
let mut requirements_layers = Vec::new();
|
||||
@@ -353,7 +354,7 @@ pub async fn load_config_layers_state(
|
||||
}
|
||||
|
||||
let mut startup_warnings = None;
|
||||
if let Some(cwd) = cwd {
|
||||
if !ignore_project_config && let Some(cwd) = cwd {
|
||||
let mut merged_so_far = TomlValue::Table(toml::map::Map::new());
|
||||
for layer in &layers {
|
||||
merge_toml_values(&mut merged_so_far, &layer.config);
|
||||
|
||||
Reference in new issue
Block a user