feat: ignore all empty environment variables
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -103,13 +103,7 @@ impl Settings {
|
|||||||
|
|
||||||
// Add environment variables
|
// Add environment variables
|
||||||
debug!("CONFIG: Adding environment variables");
|
debug!("CONFIG: Adding environment variables");
|
||||||
let mut env_source = config::Environment::with_prefix("KEEP").separator("__");
|
let env_source = config::Environment::with_prefix("KEEP").separator("__").ignore_empty(true);
|
||||||
// Ignore empty KEEP_LIST_FORMAT
|
|
||||||
if let Ok(list_format) = std::env::var("KEEP_LIST_FORMAT") {
|
|
||||||
if list_format.is_empty() {
|
|
||||||
env_source = env_source.ignore_empty(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
config_builder = config_builder.add_source(env_source);
|
config_builder = config_builder.add_source(env_source);
|
||||||
|
|
||||||
// Override with CLI args
|
// Override with CLI args
|
||||||
|
|||||||
Reference in New Issue
Block a user