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(terraform_docs): Suppress redundant warnings pop-ups introduced in v1.92.2 #700

Merged
merged 1 commit into from
Aug 27, 2024
Merged
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
8 changes: 5 additions & 3 deletions hooks/terraform_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ function terraform_docs {

if [[ $output_file ]]; then
# Extract filename from `output.file` line
text_file=$(echo "$output_file" | awk -F':' '{print $2}' | tr -d '[:space:]"' | tr -d "'")
output_file=$(echo "$output_file" | awk -F':' '{print $2}' | tr -d '[:space:]"' | tr -d "'")

if [[ $use_path_to_file ]]; then
common::colorify "yellow" "NOTE: You set both '--hook-config=--path-to-file=' and 'output.file' in '$config_file'"
if [[ $use_path_to_file == true && "$output_file" != "$text_file" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch on a need to check value of the $use_path_to_file var 👍🏻

common::colorify "yellow" "NOTE: You set both '--hook-config=--path-to-file=$text_file' and 'output.file: $output_file' in '$config_file'"
common::colorify "yellow" " 'output.file' from '$config_file' will be used."
fi

text_file=$output_file
fi

# Suppress terraform_docs color
Expand Down
Loading