diff --git a/lib/aaa_errors.sh b/lib/aaa_errors.sh index 8813227..2f39c8a 100644 --- a/lib/aaa_errors.sh +++ b/lib/aaa_errors.sh @@ -72,10 +72,10 @@ trap "error ${LINENO}; backtrace; err_exit" ERR # Exit program in case of error unless keepgoing is set to true function err_exit { - if [[ -f $tmpfile ]]; then - rm -f $tmpfile - fi if [[ $KEEPGOING != true ]]; then + if [[ -f $tmpfile ]]; then + rm -f $tmpfile + fi exit 255 fi }