fix: make terraform_docs Windows compatible (#129)

This commit is contained in:
Matias Zilli 2020-09-24 11:37:08 +02:00 committed by GitHub
commit 81770aa0fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ terraform_docs_() {
local -a -r files=("$@")
local hack_terraform_docs
hack_terraform_docs=$(terraform version | head -1 | grep -c 0.12) || true
hack_terraform_docs=$(terraform version | sed -n 1p | grep -c 0.12) || 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."