From b1b13b60b0f7067d21fcb017ab9bf37281c97320 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Tue, 11 Jan 2022 14:56:03 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20Add=20taskwarrior=20version=20error=20p?= =?UTF-8?q?rompt=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app.rs b/src/app.rs index 5507d5d..795cc35 100644 --- a/src/app.rs +++ b/src/app.rs @@ -286,6 +286,15 @@ impl TaskwarriorTui { app.filter_history.add(app.filter.as_str()); app.command_history.load()?; app.task_background(); + + if app.task_version < *TASKWARRIOR_VERSION_SUPPORTED { + app.error = Some(format!( + "Found taskwarrior version {} but taskwarrior-tui works with taskwarrior>={}", + app.task_version, *TASKWARRIOR_VERSION_SUPPORTED + )); + app.mode = Mode::Tasks(Action::Error); + } + Ok(app) }