-
-
Notifications
You must be signed in to change notification settings - Fork 582
Closed
Labels
area/local_installationbugSomething isn't workingSomething isn't workinghook/terraform_docsBash hookBash hook
Description
Describe the bug
terraform-docs --output-mode="inject" --output-file=README.md md .
which is exactly what we run by default
pre-commit-terraform/hooks/terraform_docs.sh
Line 279 in 91b5ba0
| terraform-docs --output-mode="$output_mode" --output-file="$output_file" $tf_docs_formatter $args ./ > /dev/null |
by
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.94.2 # issue introduced in 1.94.0
hooks:
- id: terraform_docsalways updates/add terraform-docs section, as long as file exist.
This break your --add-to-existing-file setting, which by default set to false
How can we reproduce it?
testdir=$(mktemp -d)
cd $testdir
touch main.tf README.md
echo "
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.94.2 # issue introduced in 1.94.0
hooks:
- id: terraform_docs
" > .pre-commit-config.yaml
git init
git add -A
pre-commit runWorkaround
antonbabenko and yermulnik
Metadata
Metadata
Assignees
Labels
area/local_installationbugSomething isn't workingSomething isn't workinghook/terraform_docsBash hookBash hook