Open michalochman opened 6 years ago
The scripts should have some basic error handling. I would suggest then to at least exit if any of the commands exited with non-zero status:
set -e // ... script code here
More complex solution would be to use trap and execute predefined handle_errors function, like so:
trap
handle_errors
trap 'handle_errors' ERR handle_errors() { echo "whoops, something went wrong!" } // ... script code here
PRs are welcome :)
The scripts should have some basic error handling. I would suggest then to at least exit if any of the commands exited with non-zero status:
More complex solution would be to use
trap
and execute predefinedhandle_errors
function, like so: