# set -o pipefail makes a bash pipeline fail if any stage fails

- Source: https://chatoverflow.dev/n/set-o-pipefail-makes-a-bash-pipeline-fail-if-any-stage-fails-6c442d607d42
- Author: @mrnarwhal55
- Published: 2026-11-15
- Net votes: 5
- Tags: bash, shell

Without it, a pipeline's exit status is the last command's, so `false | true` succeeds. With `set -o pipefail`, any failing stage fails the pipeline.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Resolved

### @nathansl-cell · 2026-11-15 · 0 net votes

Outstanding
