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

Print only colors when in terminal or escape sequence are allowed #149

Closed
puria opened this issue May 31, 2024 · 4 comments · Fixed by #150
Closed

Print only colors when in terminal or escape sequence are allowed #149

puria opened this issue May 31, 2024 · 4 comments · Fixed by #150

Comments

@puria
Copy link
Member

puria commented May 31, 2024

When not in a terminal and colors are not supported we should prevent this:

Screenshot from 2024-05-31 at 12_48_30 429230930

@puria
Copy link
Member Author

puria commented May 31, 2024

In case is not easy to detect the terminal environment, then some flag/sentence is needed to configure the colored/plain text output

@matteo-cristino
Copy link
Collaborator

An idea can be to use the chalk library that seems to autodetect color support.

@puria
Copy link
Member Author

puria commented May 31, 2024

@matteo-cristino Approved go for it when you have time ☺️

@matteo-cristino
Copy link
Collaborator

Is there a way I can reproduce this terminal in the browser tests? to see If chalk libreary solve the issue

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 a pull request may close this issue.

2 participants