Skip to content

Commit

Permalink
fix: output config TOML parse error when TOML exists but is incorrect (
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh-axiom-xyz authored Dec 16, 2024
1 parent 79451a7 commit 2856a6c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/cli/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ pub(crate) fn read_to_stdin(input: &Option<Input>) -> Result<StdIn> {
}

pub(crate) fn read_config_toml_or_default(config: &PathBuf) -> Result<AppConfig<SdkVmConfig>> {
let mut app_config: Result<AppConfig<SdkVmConfig>> = 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
}

0 comments on commit 2856a6c

Please sign in to comment.