feat: add silent for defer (#1879)

Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
This commit is contained in:
Danilo Bürger
2024-12-07 16:16:27 +01:00
committed by GitHub
parent 1a648dea50
commit 4595c1e32a
3 changed files with 9 additions and 4 deletions

View File

@@ -1,12 +1,14 @@
version: "3"
version: '3'
tasks:
task-1:
- echo 'task-1 ran {{.PARAM}}'
task-2:
- defer: { task: "task-1", vars: { PARAM: "successfully" } }
- defer: { task: 'task-1', vars: { PARAM: 'successfully' } }
- defer: { task: 'task-1', vars: { PARAM: 'successfully' }, silent: true }
- defer: echo 'echo ran'
silent: true
- defer: echo 'failing' && exit 2
- echo 'cmd ran'
- exit 1