Closed BeneHa closed 3 weeks ago
When I run pre-commit run -a terraform_docs with version 1.93.0 I always get the error:
❯ pre-commit run -a terraform_docs --verbose Terraform docs...........................................................Failed - hook id: terraform_docs - duration: 1.1s - exit code: 1 sed: 1: "README.md": invalid command code R
It happens no matter if a README.md already exists or not.
OS: OS: MacOS Darwin 2BY1-1GLP3 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64
Tools availability and versions:
GNU bash, version 5.2.32(1)-release (aarch64-apple-darwin23.4.0) pre-commit 3.8.0 zsh: command not found: tofu Terraform v1.9.5 Python 3.10.11 Python 3.10.11 checkov SKIPPED infracost SKIPPED terraform-docs version v0.18.0 228c7a7 darwin/arm64 terragrunt SKIPPED terrascan SKIPPED TFLint version 0.53.0 + ruleset.terraform (0.9.1-bundled) tfsec SKIPPED trivy SKIPPED tfupdate SKIPPED hcledit SKIPPED
.pre-commit-config.yaml
Duplicate to https://github.com/antonbabenko/pre-commit-terraform/issues/703, where a fix is already suggested.
Describe the bug
When I run pre-commit run -a terraform_docs with version 1.93.0 I always get the error:
How can we reproduce it?
It happens no matter if a README.md already exists or not.
Environment information
OS:
OS: MacOS Darwin 2BY1-1GLP3 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64
Tools availability and versions:
.pre-commit-config.yaml
:file content
```yaml ``` --- repos: - repo: https://github.com/antonbabenko/pre-commit-terraform.git rev: v1.93.0 hooks: - id: terraform_docs args: - --hook-config=--create-file-if-not-exist=true ``` ```