Skip to content

Commit

Permalink
fix: quote error in docs check
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-FFFFFF committed Jan 29, 2024
1 parent d6f96cc commit 0e9971d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions avm_scripts/docs-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ check_example_docs () {
rm -f "$dir/.terraform.lock.hcl"
terraform-docs -c ".terraform-docs.yml" "$dir"
echo "===> Comparing examples documentation in $dir"
if [ ! -z $(diff -q "$dir/README.md" "$dir/README-generated.md") ]; then
if [ ! -z "$(diff -q "$dir/README.md" "$dir/README-generated.md")" ]; then
echo "==> examples/$dir/README.md is out of date. Run 'make pre-commit' to update the generated document and commit."
rm -f "$dir/README-generated.md"
exit 1
Expand All @@ -22,7 +22,7 @@ rm -f .terraform.lock.hcl
terraform-docs -c .terraform-docs.yml .

echo "==> Comparing generated code to committed code..."
if [ ! -z $(diff -q README.md README-generated.md) ]; then
if [ ! -z "$(diff -q README.md README-generated.md)" ]; then
echo "==> README.md is out of date. Run 'make pre-commit' to update the generated document and commit."
rm -f README-generated.md
exit 1
Expand Down
4 changes: 2 additions & 2 deletions avm_scripts_canary/docs-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ check_example_docs () {
rm -f "$dir/.terraform.lock.hcl"
terraform-docs -c ".terraform-docs.yml" "$dir"
echo "===> Comparing examples documentation in $dir"
if [ ! -z $(diff -q "$dir/README.md" "$dir/README-generated.md") ]; then
if [ ! -z "$(diff -q "$dir/README.md" "$dir/README-generated.md")" ]; then
echo "==> examples/$dir/README.md is out of date. Run 'make pre-commit' to update the generated document and commit."
rm -f "$dir/README-generated.md"
exit 1
Expand All @@ -22,7 +22,7 @@ rm -f .terraform.lock.hcl
terraform-docs -c .terraform-docs.yml .

echo "==> Comparing generated code to committed code..."
if [ ! -z $(diff -q README.md README-generated.md) ]; then
if [ ! -z "$(diff -q README.md README-generated.md)" ]; then
echo "==> README.md is out of date. Run 'make pre-commit' to update the generated document and commit."
rm -f README-generated.md
exit 1
Expand Down

0 comments on commit 0e9971d

Please sign in to comment.