From 1c6d7364d298040f31dc58d12a379a8a382e00dd Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Mon, 27 Apr 2020 13:29:02 -0500 Subject: [PATCH] Fixing logic for empty array --- lib/linter.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/linter.sh b/lib/linter.sh index d7cc9ac3..353b882b 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1422,6 +1422,13 @@ LintCodebase() ################################# # shellcheck disable=SC2207,SC2086 LIST_FILES=($(cd "$GITHUB_WORKSPACE" || exit; find . -type f -regex "$FILE_EXTENSIONS" 2>&1)) + + ############################################################ + # Set it back to empty if loaded with blanks from scanning # + ############################################################ + if [ ${#LIST_FILES[@]} -lt 1 ]; then + LIST_FILES=() + fi fi if [ $SKIP_FLAG -eq 0 ]; then