mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(cli): fail on invalid config (#9107)
This commit is contained in:
@ -65,7 +65,11 @@ impl EnvironmentArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let config_path = self.config.clone().unwrap_or_else(|| data_dir.config());
|
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
|
// Make sure ETL doesn't default to /tmp/, but to whatever datadir is set to
|
||||||
if config.stages.etl.dir.is_none() {
|
if config.stages.etl.dir.is_none() {
|
||||||
|
|||||||
Reference in New Issue
Block a user