Skip to content
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

Support FORCE_COLOR env var #2918

Closed
MicaelJarniac opened this issue Jul 4, 2023 · 1 comment
Closed

Support FORCE_COLOR env var #2918

MicaelJarniac opened this issue Jul 4, 2023 · 1 comment

Comments

@MicaelJarniac
Copy link

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

@asottile
Copy link
Member

asottile commented Jul 4, 2023

dupe #1073

@asottile asottile closed this as completed Jul 4, 2023
@pre-commit pre-commit locked as resolved and limited conversation to collaborators Jul 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants