-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add option to force colorized output #582
Comments
Hey! There's a config option for that instead – Do you use lefthook in CI? Could you share your use case please? |
I do use (well plan to use) lefthook in CI. Use case is: run exactly same things on developer systems and in CI. Same versions of everything, same config of everything. pre-commit works great for that, but has some other not so great parts that I'd hope lefthook will help fix. Lefthook does not have builtin help for "same versions of everything" e.g. installing things which pre-commit does have (and that's its killer feature), but I have a hatching project at https://github.com/scop/wrun which will help with that in some cases. Some WIP dogfooding using lefthook at scop/wrun#49 -- this same thing runs both in CI and locally. |
Regarding the config option, I guess I could make do with that and set up different config files for CI and local dev, but that's IMO really an antipattern I'd like to avoid having to do by default. In CI we need to invoke lefthook manually, and dropping e.g. |
Regarding CI usage, here's pre-commit's related docs: https://pre-commit.com/#usage-in-continuous-integration In my experience, this use case for pre-commit (and other hook managers) is not at all uncommon, there are lots of repositories e.g. here at GitHub that are set up to run the same hooks locally and in GH Actions. |
⚡ Summary
An option to force colorized output would be nice. For example when running in GitHub Actions, the output is color capable but lefthook does not currently colorize there.
Value
More color and arguably readability in CI logs when lefthook is run there.
Behavior and configuration changes
Would probably be a good idea to deprecate the existing
--no-colors
flag and add a new--color={on,off,auto}
to replace it.The text was updated successfully, but these errors were encountered: