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

FORCE_COLOR support #566

Closed
travi opened this issue May 1, 2018 · 6 comments
Closed

FORCE_COLOR support #566

travi opened this issue May 1, 2018 · 6 comments

Comments

@travi
Copy link

travi commented May 1, 2018

even though supports-color is used in debug, it appears as though FORCE_COLOR is not being honored.

i'm getting color with no trouble when using with a script run directly (regardless of FORCE_COLOR being present or not), but lose the color output when using with a script run through npm-run-all, even with FORCE_COLOR enabled.

is this something specific about debug's use of supports-color?

@LoganDark
Copy link

DEBUG_COLORS Whether or not to use colors in the debug output.

README.md

@travi
Copy link
Author

travi commented Jun 19, 2018

@LoganDark i understand that there is a specific way to toggle colors for this library. however, i am not looking to force colors to be on for each individual library. part of the benefit of leveraging supports-color should be that the FORCE_COLOR convention is enabled pretty much automatically, or so i thought. i would prefer that FORCE_COLOR worked in this case than needing to enable yet another env var for color (especially for a single library)

@Qix-
Copy link
Member

Qix- commented Jun 19, 2018

Yes - you need to install supports-color alongside debug - it does not come shipped.

@travi
Copy link
Author

travi commented Jun 19, 2018

i have supports-color installed as a dependency of other cli tools and as a direct dependency. npm ls supports-color lists these from the other tools, as well as this line that shows my direct dependency: ├── [email protected] .

again, color does work fine when running a script directly that leverages debug, but using npm-run-all with its --print-label flag loses color for debug. other cli tools that are using chalk do still output color in that situation when i set FORCE_COLOR, which aligns with what is mentioned here. however, that does not work with debug for some reason.

@Qix-
Copy link
Member

Qix- commented Jun 20, 2018

Duplicate of #580 I think.

@Qix-
Copy link
Member

Qix- commented Jun 20, 2018

Going to chalk it up as such. Please let me know if that's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants