diff --git a/crates/cli/src/util.rs b/crates/cli/src/util.rs index a80e9043e3..581f00acd9 100644 --- a/crates/cli/src/util.rs +++ b/crates/cli/src/util.rs @@ -83,13 +83,13 @@ pub(crate) fn read_to_stdin(input: &Option) -> Result { } pub(crate) fn read_config_toml_or_default(config: &PathBuf) -> Result> { - let mut app_config: Result> = read_to_struct_toml(config); - if app_config.is_err() { + if config.exists() { + read_to_struct_toml(config) + } else { println!( "{:?} not found, using default application configuration", config ); - app_config = Ok(default_app_config()); + Ok(default_app_config()) } - app_config }