1
0
mirror of https://github.com/go-task/task.git synced 2025-07-15 01:35:00 +02:00

feat(defer): expose EXIT_CODE special variable to defer: (#1762)

Co-authored-by: Dor Sahar <dorsahar@icloud.com>
This commit is contained in:
Andrey Nering
2024-08-14 22:53:14 -03:00
committed by GitHub
parent 35119c12ab
commit b259edeb65
8 changed files with 93 additions and 14 deletions

17
testdata/exit_code/Taskfile.yml vendored Normal file
View File

@ -0,0 +1,17 @@
version: '3'
silent: true
vars:
PREFIX: EXIT_CODE=
tasks:
exit-zero:
cmds:
- defer: echo {{.PREFIX}}{{.EXIT_CODE}}
- exit 0
exit-one:
cmds:
- defer: echo {{.PREFIX}}{{.EXIT_CODE}}
- exit 1