fixed more bad logic

This commit is contained in:
Lucas Gravley 2020-07-01 11:59:00 -05:00
parent 6859aa5a82
commit 11608866b7
2 changed files with 8 additions and 7 deletions

View file

@ -100,11 +100,11 @@ function BuildFileList()
#####################
# Get the CFN files #
#####################
if [ "$FILE_TYPE" == "json" ] || [ "$FILE_TYPE" == "yml" ] || [ "$FILE_TYPE" == "yaml" ] && DetectCloudFormationFile "$FILE"; then
if [ "$FILE_TYPE" == "yml" ] || [ "$FILE_TYPE" == "yaml" ]; then
################################
# Append the file to the array #
################################
FILE_ARRAY_CFN+=("$FILE")
FILE_ARRAY_YML+=("$FILE")
##########################################################
# Set the READ_ONLY_CHANGE_FLAG since this could be exec #
##########################################################
@ -118,11 +118,12 @@ function BuildFileList()
# Append the file to the array #
################################
FILE_ARRAY_CFN+=("$FILE")
fi
##########################################################
# Set the READ_ONLY_CHANGE_FLAG since this could be exec #
##########################################################
READ_ONLY_CHANGE_FLAG=1
fi
######################
# Get the JSON files #
######################

View file

@ -991,7 +991,7 @@ if [ "$VALIDATE_ANSIBLE" == "true" ]; then
# Due to the nature of how we want to validate Ansible, we cannot use the
# standard loop, since it looks for an ansible folder, excludes certain
# files, and looks for additional changes, it should be an outlier
LintAnsibleFiles
LintAnsibleFiles "$ANSIBLE_LINTER_RULES" # Passing rules but not needed, dont want to exclude unused var
fi
######################