-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
fix(terraform_docs
): Suppress "terraform command not found" error message in case binary does not exist
#693
fix(terraform_docs
): Suppress "terraform command not found" error message in case binary does not exist
#693
Conversation
…age in case terraform binary does not exist
@MaxymVlasov Are you ok with the change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks legit
just lmc that it will not fail silently |
What's ps: it might make sense to wrap the local hack_terraform_docs=0
if [[ $(\command -V terraform 2> /dev/null) ]]; then
hack_terraform_docs=$(terraform version | sed -n 1p | grep -c 0.12) || true
fi WDTY? |
terraform_docs
): Suppress "terraform command not found" error message in case binary does not exist
## [1.92.1](v1.92.0...v1.92.1) (2024-08-01) ### Bug Fixes * **`terraform_docs`:** Suppress "terraform command not found" error message in case binary does not exist ([#693](#693)) ([6ff3572](6ff3572))
This PR is included in version 1.92.1 🎉 |
Put an
x
into the box if that apply:Description of your changes
If you are using OpenTofu and don't have Terraform binary installed, terraform_docs hook will display a
command not found
error. The error line checks if Terraform release is 0.12, so it's possible suppress this error message if Terraform binary doesn't exist.How can we test changes
Below are the steps to reproduce the error.
pre-commit -a