Created
August 14, 2025 14:07
-
-
Save T1T4N/0a319accda985f575fa5ba4b45ce4799 to your computer and use it in GitHub Desktop.
Getting decent error reports in Bash when you're using 'set -e'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://utcc.utoronto.ca/~cks/space/blog/programming/BashGoodSetEReports | |
trap 'echo "Exit status $? at line $LINENO from: $BASH_COMMAND"' ERR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment