Description
Libraries like node's chalk and picocolors, as well as some popular python projects based on recent discussions, support an env var called FORCE_COLOR
(and the inverse NO_COLOR
) to let the user force color output. This is useful for things like CI environments where they support colors but due to running in child processes color support gets disabled (example of this enabled with jest test output in github actions).
The way this works is when checking to see if the environment supports colors they look for a FORCE_COLOR
env var and if it's set then color support is enabled regardless of what the environment detection set, or color support is disabled in the case of NO_COLOR
. Since those two libraries are what most node tools/libraries use a lot of things light up when you enable this which greatly improves looking over build logs for instance.
I tested adding this setting to one of my projects but I'm now wondering if this is something you'd be interested in supporting in the library directly so all tools using this will benefit from it?
The project I'm testing with is a dotnet equivalent of npm run ...
so it shows the console output of other tools and would really benefit from .net console libraries supporting this. I'd also just like to see better build log output from dotnet
.
Examples of my test output can be seen in the build logs here: