Field guide to command line failures · reference only, nothing hosted here
CliHelper

The catch-all failure, and how to stop guessing.

Exit code 1

The catch-all, so read stderr

Almost every command uses 1 for generic failure. The exit code tells you nothing; the last lines of stderr usually do.

Find which command in a chain failed

set -o pipefail ./build.sh | tee build.log

Without pipefail a pipeline reports the status of the last command, so an early failure looks like success.

Make the failure stop the script

set -euo pipefail

Check the exit status directly

command; echo "status=$?"

Scope: failure mode: The catch-all failure, and how to stop guessing.

CliHelper documents failure modes of third-party command line tools. No software is stored or distributed here.

Terms Privacy Contact support@clihelper.pro