Make pipeline fail if any command fails.
Section: Shell Basics
Enable pipefail
bash
bash
set -o pipefailExplanation
Important for reliable scripts; otherwise only final pipeline status is returned.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Shell Basics