You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the sh step is prone to error when using pipes.
It's good practice to set set -o pipefail in all bash scripts because otherwise:
cat missingFile | sed s/foo/bar/g
would return a non zero exit code, which is unexepcted and hard to debug.
So: Why doesn't ces-build-lib make life easier for us an prepend pipefail before every sh call?
E.g. like so: script.sh(returnStdout: true, script: "set -e && ${args}")
Note: set -o pipefail fails (haha) with ...script.sh: 1: set: Illegal option -o pipefail.
The text was updated successfully, but these errors were encountered:
Using the
sh
step is prone to error when using pipes.It's good practice to set
set -o pipefail
in all bash scripts because otherwise:cat missingFile | sed s/foo/bar/g
would return a non zero exit code, which is unexepcted and hard to debug.
So: Why doesn't ces-build-lib make life easier for us an prepend pipefail before every
sh
call?E.g. like so:
script.sh(returnStdout: true, script: "set -e && ${args}")
Note:
set -o pipefail
fails (haha) with...script.sh: 1: set: Illegal option -o pipefail
.The text was updated successfully, but these errors were encountered: