3 ms·
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 status
by auxym 5y ago
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.
- dijit 5y agoIt'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.