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

Allow --no-colors through ENV instead of just CLI args #240

Closed
mearns opened this issue Sep 12, 2018 · 3 comments
Closed

Allow --no-colors through ENV instead of just CLI args #240

mearns opened this issue Sep 12, 2018 · 3 comments

Comments

@mearns
Copy link
Contributor

mearns commented Sep 12, 2018

It would be great to support disabling of colors, as currently done with the --no-colors, through an environment variable. For instance, if an environment variable named NO_COLORS is defined, disable colors.

@DABH
Copy link
Contributor

DABH commented Sep 12, 2018

Sure, we have FORCE_COLORS right now for forcing colors to be enabled, we could add FORCE_NO_COLORS (I would be happy to review a PR). Just figure out what should happen if both FORCE_COLORS and FORCE_NO_COLORS were set in a user's environment :)

mearns added a commit to mearns/colors.js that referenced this issue Sep 13, 2018
As mentioned [here](Marak#240 (comment)), there's a potential
conflict between FORCE_COLOR and FORCE_NO_COLOR. Decided to address this by issuing a warning (when supported)
and falling back on FORCE_COLOR, since that's will preserve existing behavior.
@mearns
Copy link
Contributor Author

mearns commented Sep 13, 2018

👍 I submitted a PR for this; I'm definitely open to any feedback on functionality or styling, just let me know =)

@DABH
Copy link
Contributor

DABH commented Sep 26, 2018

merged #21!

@DABH DABH closed this as completed Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants