If else statement #429
Replies: 4 comments 3 replies
-
Hi @pkleanthous, Sorry, but we do not have a way to do if/else statements, unless inside Bash commands. Do you have an example of what you're trying to accomplish? |
Beta Was this translation helpful? Give feedback.
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
-
@andreynering For the simple if-else statement if [ condition ]; then
command
else
error_handler
fi Here is my idea: task_name:
cmds:
- if_else:
- condition: condition
- on_true: command
- on_false: error_handler
// other commands
|
Beta Was this translation helpful? Give feedback.
-
For those landing into this discussion, we now have issues for these feature requests: |
Beta Was this translation helpful? Give feedback.
-
Hey,
I'm using the task runner daily. It's a great tool, thanks for inventing it :)
I'm wondering how can I implement if-else statements and run different tasks.
If you the tool has the above functionality, can you provide an example?
Beta Was this translation helpful? Give feedback.
All reactions