Closed sam-mcbr closed 5 months ago
Can you try setting the environment variable CLICOLOR_FORCE = '1'
?
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: https://github.com/gjtorikian/html-proofer/blob/1c8b2c12474d3e60401dd6200c2c72833af2ac31/lib/html_proofer/log.rb#L44
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 https://github.com/gjtorikian/html-proofer/pull/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!