-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Allow color in non tty shell #817
Comments
Can you try setting the environment variable |
Thanks for the quick response! Unfortunately still showing uncolored text |
Would it be possible to see how you're setting that env var, or a sample workflow? Terminal color output is dependent on https://github.com/ku1ik/rainbow/blob/138bc054cd196b54ed6a935c52653a8ac3761dfc/lib/rainbow.rb#L10-L12 html-proofer isn't doing any TTY determination, so I'm surprised the underlying library's mechanism isn't working. |
Sorry for the delay, yeah I can share an example of how I was setting the var soon. But the reason I thought the TTY would affect this is I saw this line where Rainbow is only invoked if stdout is a TTY: html-proofer/lib/html_proofer/log.rb Line 44 in 1c8b2c1
Could this be the cause of no color even with the env var set? |
I guess Rainbow updated its logic at some point, because I see now that it handles TTY/color enabling on its own. Could you try the branch at #818 and see if that works for you? |
@gjtorikian Apologies for the long delay, I was able to confirm that this change enables colored output! |
No worries, glad it worked, I'll send this out as 5.0.9 soon. |
I would like to use html-proofer in a CI job, but since the running is not a TTY shell there is no color output. Would love an environment variable or command line argument to force color output. Thanks!
The text was updated successfully, but these errors were encountered: