Skip to content

Commit

Permalink
Show better warning message when get yields no results
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed May 5, 2024
1 parent 016ded0 commit d9dab60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasklite-core/source/Lib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import Protolude as P (
(.),
(<$>),
(<&>),
(<=),
(||),
)
import Protolude qualified as P
Expand Down Expand Up @@ -2775,7 +2776,10 @@ runFilter conf now connection exps = do

if P.length errors > 0
then dieWithError $ vsep (fmap ppInvalidFilter errors)
else formatTasksColor conf now tasks
else
if P.length tasks <= 0
then pure "No tasks available for the given filter."
else formatTasksColor conf now tasks
_ -> dieWithError filterHelp


Expand Down

0 comments on commit d9dab60

Please sign in to comment.