-
- Notifications
You must be signed in to change notification settings - Fork 746
Description
- Task version: master branch (6a0b778)
- Operating System: Arch Linux
A fail of a precondition causes all future preconditions to fail too, even if the condition is met.
Example Taskfile showing the issue
tasks: default: deps: - subtask cmds: - task: check vars: ID: 1 BOOL: true - task: check vars: ID: 2 BOOL: false - cmd: "echo DONE" silent: true subtask: deps: - task: check vars: ID: 3 BOOL: true - task: check vars: ID: 4 BOOL: false - task: check vars: ID: 5 BOOL: true - task: check vars: ID: 6 BOOL: false - pass - fail check: #run: when_changed run: always preconditions: - sh: '{{.BOOL}}' msg: "[{{.ID}}]: {{.BOOL}}" pass: run: always preconditions: - sh: 'true' msg: "precondition should never fail" fail: run: always preconditions: - sh: 'false' msg: "precondition should fail"
Expected output
No precondition, where BOOL=true
should fail:
task: precondition should fail task: [6]: false task: [4]: false task: precondition not met exit status 1
Actual output
task: precondition should fail task: [3]: true task: [5]: true task: [6]: false task: [4]: false task: precondition should never fail task: precondition not met exit status 1
Metadata
Metadata
Assignees
Labels
No labels