diff --git a/lib/core_lib.sh b/lib/core_lib.sh index d470c97..873ee72 100755 --- a/lib/core_lib.sh +++ b/lib/core_lib.sh @@ -309,7 +309,7 @@ clean_up_and_exit () { return 2 fi exit_code="$1" - if [ ! "$exit_code" -gt 0 ] ; then + if [ ! "$exit_code" -ge 0 ] ; then echo "ERROR: $FUNCNAME: illegal exit code: $exit_code" >&2 return 2 fi @@ -321,6 +321,7 @@ clean_up_and_exit () { fi # remove the unwanted directory (!) + print_log_message -D "$FUNCNAME removing dir: $unwanted_dir" /bin/rm -rf "$unwanted_dir" if [ $? -ne 0 ]; then echo "ERROR: $FUNCNAME failed to remove dir: $unwanted_dir" >&2