Description
Currently, a task will fail if any of the preconditions fails. It will be very helpful to allow a task to skip conditionally without failing.
Proposal:
tasks:
my-task:
preconditions:
- test $a = 1
- sh: test $b = 2
action: skip
msg: "Skip!"
- sh: test $c = 3
action: fail
msg: "Fail!"
cmds:
- echo Hello World
- if
$a != 1, the task will fail by default.
- if
$b != 2, the task will skip with a warning "Skip!".
- if
$c != 3, the task will fail with message "Fail!".
- if both
$b != 2 and $c != 3, the task will skip instead of failing.