cli/list: don't show current task on finished
This commit is contained in:
parent
a8f8e23cf4
commit
73ab922c77
1 changed files with 8 additions and 4 deletions
|
@ -30,10 +30,14 @@ pub fn execute(repo: impl Repository, args: Args) {
|
|||
Err(err) => return eprintln!("Cannot read tasks: {}", err),
|
||||
};
|
||||
|
||||
let cur_task = match repo.get_current_task_opt() {
|
||||
Ok(cur_task) => cur_task,
|
||||
Err(err) => {
|
||||
return eprintln!("Cannot read current task: {}", err);
|
||||
let cur_task = if args.finished {
|
||||
None
|
||||
} else {
|
||||
match repo.get_current_task_opt() {
|
||||
Ok(cur_task) => cur_task,
|
||||
Err(err) => {
|
||||
return eprintln!("Cannot read current task: {}", err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue