-
-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terraform_docs sed issue with v1.93.1 for mac default sed #707
Comments
I confirm the issue ... the sed command does not raise any error (of course) but creates a new file. @MaxymVlasov @yermulnik this is why I was saying that |
I can confirm this behaviour:
Some useful information here about replacing strings in files: http://mywiki.wooledge.org/BashFAQ/021 tl;dr: "The preferred way to modify a file is to create a new file within the same file system, write the modified content into it, and then mv it to the original name." |
This comment was marked as outdated.
This comment was marked as outdated.
Test this please repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: a76f03bfc4978741f37f79a6b4a86dc72078a78d
hooks:
- id: terraform_docs |
Yes, it works |
This issue has been resolved in version 1.94.1 🎉 |
Describe the bug
Since the fix of a bug in #704 by @cschroer , the empty sed -i flag does not work for me. Now, a
README.md-e
file is being created as well as theREADME.md
. I am using Mac's default sed.I know I can install GNU sed, but I think many users are using the default sed and will run into this issue.
How can we reproduce it?
Run pre-commit tf_docs on a Mac with the default sed installed.
Environment information
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
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 SKIPPED Python 3.12.4 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
:file content
The text was updated successfully, but these errors were encountered: