chalk/supports-color


The issue has been closed
supportsColor() should recheck process.env.FORCE_COLOR #114
jaydenseric posted onGitHub
At the moment, the supportsColor()
function does not consider all the environment variables fresh each time it's called. This means changing process.env.FORCE_COLOR
at runtime has no effect on the supportsColor()
result.
This bug prevents us from being able to do process.env.FORCE_COLOR = '1'
, run a snapshot test of something that uses chalk
/supports-color
for formatting, then revert the FORCE_COLOR
back again.
This issue probably blocks a fix for https://github.com/babel/babel/issues/12442 .