Closed marwan-at-work closed 3 years ago
Hi @marwan-at-work
I assume it's due to the automatic color detection here:
https://github.com/fatih/color/blob/master/color.go#L20
Can you explicitly set it to false to bypass the check: color.NoColor = false
and try again? The check is there to avoid mangling the input to a tool during a pipe operation.
Yep, color.NoColor = false
did the trick. Thank you for the quick response 🙌🏼
Added a quick PR to mention this in the README.
Hope you're well 👍🏼
Thanks for the documentation in the Readme @marwan-at-work. Everything is fine on my end and I hope things are also going great for you :)
Hi there Fatih 👋🏼
So I'm not totally sure why, but if I run
color.Yellow("HELLO")
from inside GitHub Actions, no color is actually printed.But if I use another library such as
aurora/v3
and writefmt.Println(aurora.Sprintf(aurora.Magenta("OK?")))
, a color is actually printed in the Actions UI.I definitely prefer this library for its nice API :)
I'll try to dig into it more if I get some free time, but thought I'd bring it up in case anyone is curious to dig into this before me.
Thanks!