Skip to content

Commit

Permalink
fix: always parse env args (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored Mar 20, 2024
1 parent 93f838b commit df583a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ impl Config {
tracing::info!("Global config not found at {}", location.display());
}
}

// Load the default CLI config and layer it on top of the global config
// This will add any environment variables defined in the `clap` attributes to the config
let mut default_cli = ConfigCli::default();
default_cli.update_from(std::env::args().take(0));
merged_config.merge_config(&default_cli.into());

merged_config
}

Expand Down

0 comments on commit df583a0

Please sign in to comment.