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: Print out the full path in tflint when run through pre-commit #357

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Fix terraform_fmt
  • Loading branch information
MaxymVlasov committed Apr 13, 2022
commit afde258978090e4d2382fd90bb230347d0b349ac
3 changes: 1 addition & 2 deletions hooks/terraform_fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function terraform_fmt_ {
# run hook for each path
for dir_path in $(echo "${dir_paths[*]}" | tr ' ' '\n' | sort -u); do
dir_path="${dir_path//__REPLACED__SPACE__/ }"
pushd "$dir_path" > /dev/null || continue
[ ! -d "$dir_path" ] && continue

per_dir_hook_unique_part "$args" "$dir_path"

Expand All @@ -67,7 +67,6 @@ function terraform_fmt_ {
final_exit_code=$exit_code
fi

popd > /dev/null
done

# TODO: Unique part
Expand Down