task
task copied to clipboard
Seems like `pipefail` is not applied to `status` commands
Description
Taskfile:
version '3'
set:
- errexit
- nounset
- pipefail
- xtrace
...
foo:
cmd: echo RUNNING FOO
status:
- cat non-existent-file | jq '{}'
...
Running this:
$ task foo
task: Task "foo" is up to date
As a user, I expected pipefail to be applied and used for status commands as well, not just for cmd/cmds.
Version
3.45.4
Operating system
macOS
Experiments Enabled
No response
Example Taskfile
version '3'
set:
- errexit
- nounset
- pipefail
- xtrace
tasks:
foo:
cmd: echo RUNNING FOO
status:
- cat non-existent-file | jq '{}'
@arikkfir Hi, I developed a draft PR for this. You might evaluate it and provide feedback, if it works as you expect (or not).
You can also not do this at all, and formulate your task like this:
version '3'
tasks:
foo:
cmd: echo RUNNING FOO
status:
- cat non-existent-file
- jq '{}'
Which I think achieves the same effect.