Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass all files in the array instead of just the first element #159

Closed
wants to merge 11 commits into from
Closed
4 changes: 2 additions & 2 deletions terraform_tfsec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ main() {
parse_cmdline_ "$@"

# propagate $FILES to custom function
tfsec_ "$ARGS" "$FILES"
tfsec_ "$ARGS" "${FILES[*]}"
}

tfsec_() {
# consume modified files passed from pre-commit so that
# tfsec runs against only those relevant directories
for file_with_path in $FILES; do
for file_with_path in ${FILES[*]}; do
file_with_path="${file_with_path// /__REPLACED__SPACE__}"
paths[index]=$(dirname "$file_with_path")

Expand Down