Skip to content

Commit

Permalink
Enable globstar shell option and enable globbing
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0l committed Jan 25, 2020
1 parent 1c0f58a commit 89f748e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion iam-lint
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -ueo pipefail

# To enable '**/' globbing pattern
shopt -s globstar

RC=0

COLOR_RED='\e[31m'
Expand Down Expand Up @@ -37,7 +40,8 @@ printf "parliament version: %s\n" "${PARLIAMENT_VERSION}"
printf "parliament arguments: %s\n" "${PARLIAMENT_ARGS[*]}"
printf "\n"

POLICY_FILES="$(find "${POLICY_DIR_PATH}" -type f -name "*.${POLICY_FILE_SUFFIX}")"
# shellcheck disable=SC2086
POLICY_FILES="$(find ${POLICY_DIR_PATH} -type f -name "*.${POLICY_FILE_SUFFIX}")"
if [[ -z "${POLICY_FILES}" ]]; then
red "No policy files found!"

Expand Down

0 comments on commit 89f748e

Please sign in to comment.