fix: ignore empty KEEP_LIST_FORMAT environment variable
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -103,7 +103,14 @@ impl Settings {
|
||||
|
||||
// Add environment variables
|
||||
debug!("CONFIG: Adding environment variables");
|
||||
config_builder = config_builder.add_source(config::Environment::with_prefix("KEEP").separator("__"));
|
||||
let mut env_source = config::Environment::with_prefix("KEEP").separator("__");
|
||||
// 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);
|
||||
|
||||
// Override with CLI args
|
||||
if let Some(dir) = &args.options.dir {
|
||||
|
||||
Reference in New Issue
Block a user