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

NO_COLOR does not work with Ink #18514

Closed
sidharthachatterjee opened this issue Oct 11, 2019 · 3 comments · Fixed by #18533
Closed

NO_COLOR does not work with Ink #18514

sidharthachatterjee opened this issue Oct 11, 2019 · 3 comments · Fixed by #18533
Labels
help wanted Issue with a clear description that the community can help with. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@sidharthachatterjee
Copy link
Contributor

Ink uses chalk internally which does a bunch of magic to figure out whether to render colours or not.

In /packages/gatsby-cli/src/reporter/index.js we try to set FORCE_COLOR to 0 but that is too late because chalk has already initialised and set colours to true.

@sidharthachatterjee sidharthachatterjee added type: bug An issue or pull request relating to a bug in Gatsby help wanted Issue with a clear description that the community can help with. labels Oct 11, 2019
@jmsv
Copy link
Contributor

jmsv commented Oct 19, 2019

@sidharthachatterjee I think the PR referenced above should fix this, although not sure how to test. Do you have repro steps for attempting to disable colours?

@jmsv
Copy link
Contributor

jmsv commented Oct 19, 2019

nvm, didn't see the other PR 😄 will close

@sidharthachatterjee
Copy link
Contributor Author

@jmsv Sorry for missing your comment!

Fixed and published in gatsby-cli@2.8.4 thanks to @Mrigank11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
3 participants