Closed
Description
I'm using Task and hit this issue and was directed here: go-task/task#392 (comment)
I want my script to fail on pipe errors. cmd1
works/fails as expected, but cmd2
never fails:
cmd1:
cmds:
- set -o pipefail ; aws something | jq .someField
- echo success # this never happens if aws fails
cmd2:
cmds:
- |
set -e
set -o pipefail
aws something | jq .someField
echo success # happens despite error in the aws command
Why does pipefail
not work in the second case?
Metadata
Assignees
Labels
No labels
Activity