Skip to content

Commit

Permalink
fix(terraform_docs): Suppress redundant warnings pop-ups introduced…
Browse files Browse the repository at this point in the history
… in v1.92.2 (#700)
  • Loading branch information
MaxymVlasov authored Aug 27, 2024
1 parent f809e53 commit 59b2454
Showing 1 changed file with 5 additions and 3 deletions.
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
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

0 comments on commit 59b2454

Please sign in to comment.