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

Add an option to disable the colours of the errors in the cli #3736

Closed
cricrio opened this issue Jan 27, 2018 · 3 comments
Closed

Add an option to disable the colours of the errors in the cli #3736

cricrio opened this issue Jan 27, 2018 · 3 comments

Comments

@cricrio
Copy link
Contributor

cricrio commented Jan 27, 2018

There is a problem of readability of the errors with a white background. (cf: #2645)
I made a pull request to change the background color to red but it doesn't look good. (cf: #3734)

A better solution to solve the problem may be to disable the color with an option like: --disable-error-color

Example:

gatsby develop --disable-error-color
@calcsam
Copy link
Contributor

calcsam commented Jan 27, 2018

This is a great solution -- feel free to implement!

@calcsam
Copy link
Contributor

calcsam commented Jan 27, 2018

You'll probably want to use the --no-color flag, or failing that FORCE_COLOR=0 on chalk: https://www.npmjs.com/package/chalk

@cricrio
Copy link
Contributor Author

cricrio commented Jan 28, 2018

Thanks! The --no-color flag does half the trick as it can already be used to disable chalk but it doesn't disable them in the errors because they are using pretty-error. I will write something to catch the flag and call the method withoutColors

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

No branches or pull requests

4 participants