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:
pre-commit --version
pre-commit 3.3.3
search you tried in the issue tracker
FORCE_COLOR, color
describe your actual problem
Add support for the
FORCE_COLORenvironment 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 toalways.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_COLORshould be deprecated, just thatFORCE_COLORshould also be supported.Some projects that use this:
Related:
FORCE_COLORenv var astral-sh/ruff#5499FORCE_COLORenv var python-poetry/cleo#341pre-commit --version
pre-commit 3.3.3