1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00
This commit is contained in:
Valentin Maerten
2025-01-05 10:42:34 +01:00
parent 08bd0d982a
commit d3e0fc9eea
2 changed files with 22 additions and 9 deletions

View File

@@ -1019,6 +1019,21 @@ tasks:
- echo "I will not run"
```
They can be defined at two levels:
- Global Level: Applies to all tasks.
- Task Level: Applies only to a specific task.
```yaml
version: '3'
preconditions:
- sh: 'exit 1'
tasks:
task-will-fail: echo "I will not run"
```
### Limiting when tasks run
If a task executed by multiple `cmds` or multiple `deps` you can control when it