-
-
Notifications
You must be signed in to change notification settings - Fork 913
Description
search you tried in the issue tracker
FORCE_COLOR, color
describe your actual problem
Add support for the FORCE_COLOR environment variable. When set, regardless of value, all output should have colors enabled, as if the terminal supported them.
pre-commit seems to support a similar env var, PRE_COMMIT_COLOR, that should have a similar effect when set to always.
FORCE_COLOR, however, seems to be basically a universal approach to this, and is being used by many other projects.
Supporting it means that one only has to set a single env var to enable colors on all tools at once automatically.
If every tool were to create its own unique env var, CI configuration would easily get too crowded and messy.
I'm not saying that PRE_COMMIT_COLOR should be deprecated, just that FORCE_COLOR should also be supported.
Some projects that use this:
Related:
- [REQUEST] Enable colours when FORCE_COLOR env var is set Textualize/rich#2425
- Provide a FORCE_COLOR variable? wntrblm/nox#502
- Enable colours when FORCE_COLOR env var is set pypa/pip#10909
- Support
FORCE_COLORenv var astral-sh/ruff#5499 - Support
FORCE_COLORenv var python-poetry/cleo#341
pre-commit --version
pre-commit 3.3.3