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

Colors when output is not a TTY #119

Closed
rudolphfroger opened this issue May 11, 2021 · 1 comment
Closed

Colors when output is not a TTY #119

rudolphfroger opened this issue May 11, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@rudolphfroger
Copy link

Currently Cucumber is using color codes even when the output isn't a TTY. For example in Jenkins one can see output like this:

[0m�[1m�[34m[Summary]
�[0m�[0m�[1m�[37m1 features
�[0m�[0m�[1m�[37m1 scenarios (�[0m�[0m�[1m�[32m1 passed�[0m�[0m�[1m�[37m)
�[0m�[0m�[1m�[37m6 steps (�[0m�[0m�[1m�[32m3 passed�[0m�[0m�[1m�[37m)
�[0m

I haven't tried but I can see one place which enforces the use of colors, in macros.rs there's usage of ColorChoice::Always. The termcolor crate gives an example on how to detect the presence of a terminal and set ColorChoice accordingly.

@bbqsrc bbqsrc added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jul 19, 2021
@tyranron
Copy link
Member

Resolved in #128

@tyranron tyranron removed help wanted Extra attention is needed good first issue Good for newcomers labels Sep 27, 2021
@tyranron tyranron added this to the 0.10 milestone Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants