From 81770aa0fab607a0c2472f06c94afc7bff4fdc44 Mon Sep 17 00:00:00 2001 From: Matias Zilli Date: Thu, 24 Sep 2020 11:37:08 +0200 Subject: [PATCH] fix: make terraform_docs Windows compatible (#129) --- terraform_docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform_docs.sh b/terraform_docs.sh index ae898bcd3..5931943dc 100755 --- a/terraform_docs.sh +++ b/terraform_docs.sh @@ -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."