4 ms·
Personally, I use NO_COLOR or other techniques to disable color when I'm logging output or using a CI/CD pipeline. Color codes tend to create all kinds of garba
by emeraldd 5y ago
Personally, I use NO_COLOR or other techniques to disable color when I'm logging output or using a CI/CD pipeline. Color codes tend to create all kinds of garbage in your logs otherwise.
- layer8 5y agoSoftware shouldn‘t output color when the output is redirected, unless something like `--color=always` is specified.
- lilyball 5y agoCI often runs software in a pseudo-terminal.
- deathanatos 5y agoHuh, I seem to have the opposite problem in that our CI doesn't emulate a terminal. (It should… but alas.) We're even moving to Github Actions, and that also doesn't.
- usr1106 5y agoI like color in my CI logs because it makes it easier for a human to spot various information. Obviously sometimes you might want to grep your logs and then color sequences might be annoying. I guess there is a command line tool / sed / awk oneliner to remove them. Unix filters are from the 1970s after all. The question is just what is the tool. I'd guess SO knows... But it's Sunday morning and I am on my phone not motivated to work :)