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."