From 2f7f03efe36ee55c6cb58b2a33554f70b2affbf4 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Fri, 19 Jun 2020 12:39:08 -0500 Subject: [PATCH] fixing logic --- lib/linter.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 6fa50fae..01e85333 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1096,7 +1096,7 @@ GetValidationInfo() # Set the value ANSIBLE_DIRECTORY="$TEMP_ANSIBLE_DIRECTORY" fi - + ############################### # Get the disable errors flag # ############################### @@ -1119,8 +1119,6 @@ GetValidationInfo() DISABLE_ERRORS="false" fi - - ############################ # Get the run verbose flag # ############################ @@ -1898,15 +1896,13 @@ Footer() ################################## # Exit with 0 if errors disabled # ################################## - - if ${DISABLE_ERRORS} then + if [ "$DISABLE_ERRORS" == "true" ]; then + echo "WARN! Exiting with exit code:[0] as:[DISABLE_ERRORS] was set to:[$DISABLE_ERRORS]" exit 0 - fi - ############################### # Exit with 1 if errors found # ############################### - if [ "$ERRORS_FOUND_YML" -ne 0 ] || \ + elif [ "$ERRORS_FOUND_YML" -ne 0 ] || \ [ "$ERRORS_FOUND_JSON" -ne 0 ] || \ [ "$ERRORS_FOUND_XML" -ne 0 ] || \ [ "$ERRORS_FOUND_MARKDOWN" -ne 0 ] || \