by aablkn · 11y ago · 0 comments
`echo OK | false | echo OK2` --> this command returns zero exit code even though false does return non-zero exit code. If you do `set -o pipefail` entire pipe will fail with non-zero exit code (of `false`).
at least hashpipe stops the output, so this would not run the bad code. hashpipe would stop it:
cat evil | hashpipe <some-other-hash> | sh
without pipefail, it would still exit 0, but at least the evil would be contained.