Fix order of evaluation
We need to evaluate the commandline argument first and if there is none, we use the default. This patch fixes that bug.
This commit is contained in:
parent
912a48cbfe
commit
0cde88d661
1 changed files with 4 additions and 2 deletions
|
@ -26,8 +26,10 @@ use toml_query::read::TomlValueReadExt;
|
|||
pub fn get_diary_name(rt: &Runtime) -> Option<String> {
|
||||
use libimagdiary::config::get_default_diary_name;
|
||||
|
||||
get_default_diary_name(rt)
|
||||
.or(rt.cli().value_of("diaryname").map(String::from))
|
||||
rt.cli()
|
||||
.value_of("diaryname")
|
||||
.map(String::from)
|
||||
.or_else(|| get_default_diary_name(rt))
|
||||
}
|
||||
|
||||
pub enum Timed {
|
||||
|
|
Loading…
Reference in a new issue