Skip to content

Commit

Permalink
grep out any .tf files to avoid trying to scanning anything that isn'…
Browse files Browse the repository at this point in the history
…t a folder, which will fail the scan
  • Loading branch information
jnqn committed Jul 12, 2022
1 parent d38c3ec commit 7acfaa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform-static-analysis/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ declare -i tflint_exitcode=0
declare -i tfinit_exitcode=0

# Identify which Terraform folders have changes and need scanning
tf_folders_with_changes=`git diff --no-commit-id --name-only -r @^ | awk '{print $1}' | grep '\.tf' | sed 's#/[^/]*$##' | uniq`
tf_folders_with_changes=`git diff --no-commit-id --name-only -r @^ | awk '{print $1}' | grep '\.tf' | sed 's#/[^/]*$##' | grep -v '\.tf' | uniq`
echo
echo "TF folders with changes"
echo $tf_folders_with_changes
Expand Down

0 comments on commit 7acfaa9

Please sign in to comment.