Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: George L. Yermulnik <[email protected]>
  • Loading branch information
MaxymVlasov and yermulnik authored Sep 9, 2024
1 parent d5a98e5 commit 1f88369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/terraform_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function terraform_docs {
# terraform-docs in 'inject' mode adds markers by default if they are not present
#
if [[ $add_to_existing == false ]]; then
HAVE_MARKER=$(grep -o "$insertion_marker_begin" "$output_file" || exit 0)
HAVE_MARKER=$(grep -o "$insertion_marker_begin" "$output_file") || true
[[ ! $HAVE_MARKER ]] && continue
fi
# shellcheck disable=SC2086
Expand All @@ -286,7 +286,7 @@ function terraform_docs {
# and, if not, append "hook markers" to the end of the file.
#
if [[ $add_to_existing == true ]]; then
HAVE_MARKER=$(grep -o "$insertion_marker_begin" "$output_file" || exit 0)
HAVE_MARKER=$(grep -o "$insertion_marker_begin" "$output_file") || true

if [[ ! $HAVE_MARKER ]]; then
# Use of insertion markers, when "add_to_existing=true" with no markers in the existing file
Expand Down

0 comments on commit 1f88369

Please sign in to comment.