Skip to content

Commit

Permalink
Relax exit code condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Scavo committed May 1, 2017
1 parent 65ba9d4 commit e585128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/core_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e585128

Please sign in to comment.