start reworking config loading (for transition) WIP

This commit is contained in:
steven-omaha
2023-02-23 12:09:09 +01:00
parent 5f85394f62
commit 100ee9bef9
3 changed files with 22 additions and 8 deletions
+1 -5
View File
@@ -29,11 +29,7 @@ impl Config {
Ok(content) => content,
Err(e) => {
if e.kind() == ErrorKind::NotFound {
println!(
"creating default config under {}",
config_file.to_string_lossy()
);
return Self::use_default_and_save_to(config_file);
bail!(crate::Error::ConfigFileNotFound)
}
bail!("unexpected error occured: {e:?}");
}