Skip to content
Snippets Groups Projects
Commit 14d487f9 authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

-Added environment variable option (NO_EXIT) to unb_error.

parent 5c404572
Branches
Tags
No related merge requests found
...@@ -46,7 +46,8 @@ unb_error() { ...@@ -46,7 +46,8 @@ unb_error() {
echo -en '\E[40;36m'"\033[1m[${caller}]\033[0m " echo -en '\E[40;36m'"\033[1m[${caller}]\033[0m "
echo -e '\E[40;31m'"\033[1mERROR - ${msg}. \033[0m " echo -e '\E[40;31m'"\033[1mERROR - ${msg}. \033[0m "
tput sgr0 tput sgr0
exit ${exitcode} # Exit if $NO_EXIT does not exist, else only return.
if [ -z ${NO_EXIT} ]; then exit ${exitcode}; else return 1; fi
} }
# Non-exiting version of unb_error in case we wish to accumulate errors and # Non-exiting version of unb_error in case we wish to accumulate errors and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment