Skip to content

Conversation

@valadaptive
Copy link

Fixes #79.

Re-fixes #41, which #87 purported to fix but did not.

In order to replace chalk everywhere, we should match the behavior of the supports-color package, which always disables color if stdout is not a TTY. This occurs before any CI checks.

This means that GitHub Actions output will once again be uncolored, but this matches how chalk and supports-color behave. It's a bit less pretty, but avoids nasty compatibility issues like I encountered in mochajs/mocha#5471.

Maybe we should change the check to (p.stdout || {isTTY: true}).isTTY, for further compatibility?

@mark-wiemer
Copy link

@alexeyraspopov, are you able to review this one? It'd help Mocha clean up its dependencies, otherwise we might start a fork of picocolors to work around this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why 'CI' in env forces color support? Colors are always enabled in CI, even when output is piped

2 participants