Fix init when settings path doesn't exist

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/14/head
trivernis 3 years ago
parent cbdbbfb801
commit 2e3e55406b
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -55,7 +55,14 @@ fn main() -> RepoResult<()> {
let settings = if opt.repo.exists() {
opt.repo = opt.repo.canonicalize().unwrap();
load_settings(&opt.repo)?
match load_settings(&opt.repo) {
Ok(s) => s,
Err(e) => {
log::warn!("failed to read settings {}", e);
Settings::default()
}
}
} else {
Settings::default()
};

Loading…
Cancel
Save