Skip to main content
added 49 characters in body
Source Link
carbolymer
  • 335
  • 3
  • 11

After some digging, I've found this answer: https://stackoverflow.com/questions/22464786/ignoring-bash-pipefail-for-error-code-141#comment60412687_33026977 Basically, using:

set -euxo pipefail
yes phrase | make installer || test $(ec=$? ; if [ "$ec" -eq 141 ]; then exit 0; else exit "$ec"; fi)

just filters out SIGPIPE from return codes.

After some digging, I've found this answer: https://stackoverflow.com/questions/22464786/ignoring-bash-pipefail-for-error-code-141#comment60412687_33026977 Basically, using:

set -euxo pipefail
yes phrase | make installer || test $? -eq 141

just filters out SIGPIPE from return codes.

After some digging, I've found this answer: https://stackoverflow.com/questions/22464786/ignoring-bash-pipefail-for-error-code-141#comment60412687_33026977 Basically, using:

set -euxo pipefail
yes phrase | make installer || (ec=$? ; if [ "$ec" -eq 141 ]; then exit 0; else exit "$ec"; fi)

just filters out SIGPIPE from return codes.

Source Link
carbolymer
  • 335
  • 3
  • 11

After some digging, I've found this answer: https://stackoverflow.com/questions/22464786/ignoring-bash-pipefail-for-error-code-141#comment60412687_33026977 Basically, using:

set -euxo pipefail
yes phrase | make installer || test $? -eq 141

just filters out SIGPIPE from return codes.