1
0
mirror of https://github.com/go-task/task.git synced 2025-11-27 22:38:20 +02:00
Files
task/testdata/deferred/Taskfile.yml

30 lines
631 B
YAML
Raw Normal View History

version: '3'
2021-12-15 00:03:37 -05:00
tasks:
task-1:
- echo 'task-1 ran {{.PARAM}}'
2021-12-15 00:03:37 -05:00
task-2:
- defer: { task: 'task-1', vars: { PARAM: 'successfully' } }
- defer: { task: 'task-1', vars: { PARAM: 'successfully' }, silent: true }
2021-12-15 00:03:37 -05:00
- defer: echo 'echo ran'
silent: true
2021-12-15 00:03:37 -05:00
- defer: echo 'failing' && exit 2
- echo 'cmd ran'
- exit 1
2025-04-21 18:43:20 +02:00
parent:
vars:
VAR1: "value-from-parent"
cmds:
- defer:
task: child
vars:
VAR1: 'task deferred {{.VAR1}}'
- task: child
vars:
VAR1: 'task immediate {{.VAR1}}'
child:
cmds:
- cmd: echo "child {{.VAR1}}"