Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Nonzero exit as an error is only a convention, no? I've definitely used CLI programs in the past that used nonzero codes to report all sorts of non-error statuses.


view as:

It's more than convention though.

if you run those commands in bash with `set -e` then the script will exit early when a command exits non-zero.

I often run: `set -euo noglob -o pipefail` which is a way of preventing cascading catastrophes with bash scripts.


Legal | privacy