Skip to content

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

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

Closed
wants to merge 11 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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