Skip to content

Commit

Permalink
fix(config): Merge custom config over repo config
Browse files Browse the repository at this point in the history
Custom config, like args, is more mutable, so it should be respected
more.
  • Loading branch information
Ed Page committed Jan 5, 2021
1 parent 5db9a8e commit ecb32a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ fn init_logging(level: Option<log::Level>) {
fn load_config(cwd: &std::path::Path, args: &args::Args) -> Result<config::Config, anyhow::Error> {
let mut config = config::Config::default();

if let Some(path) = args.custom_config.as_ref() {
config.update(&config::Config::from_file(path)?);
}
if !args.isolated {
let derived = config::Config::derive(cwd)?;
config.update(&derived);
}
if let Some(path) = args.custom_config.as_ref() {
config.update(&config::Config::from_file(path)?);
}

config.update(&args.config);
config.default.update(&args.overrides);
Expand Down

0 comments on commit ecb32a6

Please sign in to comment.