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
Use SKIP variable in pre-commit install-hooks
#3096
Comments
the version output does not match any version that's ever been released |
I'm not sure if giving SKIP another meaning really makes sense. why are you skipping installation in the first place? |
The issue below why I want to skip the installation and execution of a hook.
|
it would probably be better to figure out why |
I've already spent a fair amount of time on that in the past, I decided to skip it in the CI and keep it in the pre-commit. It's a third party action. From my point of view SKIP does not change meaning if it also skips the hooks for install-hooks - it's still skipping hooks for the pre-commit execution. It's up to you, I can still add another workaround: comment the hook automatically in the |
it's mostly that SKIP is only intended to be an environment variable because there's no other interface at commit time. there's no such limitation for other commands though ideally it'd probably benefit more people to figure out the perl issue |
When I can I share my findings back to the project, but here the effort to fix it is currently too important. For pre-commit I submitted a proposal for feature that could have other benefits. There are another benefits of skipping with install-hooks: no installation of manual hooks that are not useful in CI (and less resource usage). Anyway, this is my workaround I now use in case anybody else needs something similar:
|
Sorry, it was 3.6.0. |
search you tried in the issue tracker
is:issue install-hooks "skip"
describe your actual problem
The SKIP environment variable allows skipping hook executing.
I use it in ci because one of the hooks does not install properly.
To optimize, I try to build a Docker image with pre-installed hooks using
However, the perltidy hook is still being installed (and fails).
My suggestion is to skip installation of a hook when it is in the SKIP environment variable.
pre-commit --version
precommit: 3.6.8
The text was updated successfully, but these errors were encountered: