-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
better handle missing dependancies #69
Comments
Hi Christopher, There can be a way to verify that dependencies are installed, but it will make invocation much slower. I agree we could make README more complete and describe dependencies more accurately. Pull request and ideas are welcome. |
This issue has been automatically marked as stale because it has been open 30 days |
Not sure if this was discussed in a different issue, but I see that some other hooks ship with dependencies, or download them if missing (not sure which); what if pre-commit-terraform did so with it's dependencies? The specific problem we're running into is that our pre-commit.ci run is failing due to Terraform not being installed in the runner. Note this would also make installation easier for those that might not have Terraform installed (#445), such as a monorepo where Terraform is mixed with app code, worked on by different people. Thanks! |
@afeld that's not possible to do natively via pre-commit, check pre-commit/pre-commit#1453 |
I forked the shellcheck-py approach and did the exact same for terraform: https://github.com/yuvipanda/terraform-bin. It's not published on PyPI, but this approach works fine for pre-commit.ci! I currently have a pre-commit-hooks.yaml file setup on that repo so it is used directly. However, if possible, perhaps it could be made a dependency of this repo, so I could use this repo instead? This way, it would work fine on pre-commit.ci without any issues as well :) Am happy to transfer ownership, etc as needed too. |
@yuvipanda if you'd like to talk about this - please open a new issue. You're the first folk on my way who use So, I don't think that supporting a solution that will work only with this CI is worth anything. If it can run not only in |
it's unclear from the documentation that various hooks don't work unless you install a separate tool into the path. It would be great to call this out on README. I was running terraform_docs_replace and it was just writing an empty file. I had to dive into the code to determine that it requires a separate install.
Does pre-commit not support a way to install the dependencies? Unfortunately, my team won't be able to use those hooks since it doesn't automatically install them.
The text was updated successfully, but these errors were encountered: