Skip to content

Commit 81770aa

Browse files
authored
fix: make terraform_docs Windows compatible (antonbabenko#129)
1 parent cc4e5e8 commit 81770aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

terraform_docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ terraform_docs_() {
5252
local -a -r files=("$@")
5353

5454
local hack_terraform_docs
55-
hack_terraform_docs=$(terraform version | head -1 | grep -c 0.12) || true
55+
hack_terraform_docs=$(terraform version | sed -n 1p | grep -c 0.12) || true
5656

5757
if [[ ! $(command -v terraform-docs) ]]; then
5858
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

Comments
 (0)