Skip to content

Commit

Permalink
feat(cli): fail on invalid config (#9107)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored Jun 25, 2024
1 parent 83ef1f7 commit b36bd58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/reth/src/commands/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ impl EnvironmentArgs {
}

let config_path = self.config.clone().unwrap_or_else(|| data_dir.config());
let mut config: Config = confy::load_path(config_path).unwrap_or_default();
let mut config: Config = confy::load_path(config_path)
.inspect_err(
|err| warn!(target: "reth::cli", %err, "Failed to load config file, using default"),
)
.unwrap_or_default();

// Make sure ETL doesn't default to /tmp/, but to whatever datadir is set to
if config.stages.etl.dir.is_none() {
Expand Down

0 comments on commit b36bd58

Please sign in to comment.