From 10f3d025b5d6b6b3013b3f275f42738d773ee967 Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Thu, 1 Aug 2024 20:13:34 +0300 Subject: [PATCH] Apply suggestions from code review --- hooks/terraform_docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/terraform_docs.sh b/hooks/terraform_docs.sh index ffcc6a102..b547c39bc 100755 --- a/hooks/terraform_docs.sh +++ b/hooks/terraform_docs.sh @@ -47,7 +47,7 @@ function terraform_docs_ { IFS=";" read -r -a configs <<< "$hook_config" local hack_terraform_docs - hack_terraform_docs=$(terraform version 2> /dev/null | sed -n 1p | grep -c 0.12) || $(tofu version 2> /dev/null | echo 0) || true + hack_terraform_docs=$(terraform version 2> /dev/null | sed -n 1p | grep -c 0.12 || tofu version 2> /dev/null | echo 0) || true if [[ ! $(command -v terraform-docs) ]]; then echo "ERROR: terraform-docs is required by terraform_docs pre-commit hook but is not installed or in the system's PATH."