Skip to content
Prev Previous commit
Next Next commit
Fix non-zero exit when continue
  • Loading branch information
Mice7R committed Feb 12, 2024
commit 3402a53c3ddfe02dd58c617aef8c6be173b19b24
2 changes: 1 addition & 1 deletion src/blocks/timewarrior.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ async fn get_current_timewarrior_task() -> Result<Option<TimewarriorData>> {
async fn stop_continue() -> Result<()> {
let is_stopped = get_current_timewarrior_task()
.await?
.map_or(false, |tw| tw.end.is_some());
.map_or(true, |tw| tw.end.is_some());
let args = if is_stopped { "continue" } else { "stop" };
Command::new("timew")
.args([args])
Expand Down