3 ms·
One of the first things I do is turn on errexit and pipefail options, but trapping ERR and combining with LINENO to catch silent exits is brilliant!
by k3vinw 1y ago
One of the first things I do is turn on errexit and pipefail options, but trapping ERR and combining with LINENO to catch silent exits is brilliant!
- pottmi 1y agoYou will like the final version of the traperr ERR function. It looks to create a "stack trace" type dump of where you are in the script when it fails. See it here: https://github.com/pottmi/stringent.sh https://github.com/pottmi/stringent.sh