We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
terraform_docs
1 parent 2d7a2fb commit 6ff3572Copy full SHA for 6ff3572
hooks/terraform_docs.sh
@@ -47,7 +47,10 @@ function terraform_docs_ {
47
IFS=";" read -r -a configs <<< "$hook_config"
48
49
local hack_terraform_docs
50
- hack_terraform_docs=$(terraform version | sed -n 1p | grep -c 0.12) || true
+ local hack_terraform_docs=0
51
+ if [[ $(\command -V terraform 2> /dev/null) ]]; then
52
+ hack_terraform_docs=$(terraform version | sed -n 1p | grep -c 0.12) || true
53
+ fi
54
55
if [[ ! $(command -v terraform-docs) ]]; then
56
echo "ERROR: terraform-docs is required by terraform_docs pre-commit hook but is not installed or in the system's PATH."
0 commit comments