infinitered / solidarity

Solidarity is an environment checker for project dependencies across multiple machines.
https://infinitered.github.io/solidarity/
MIT License
639 stars 49 forks source link

Add `--no-color` option #239

Closed cameronhunter closed 5 years ago

cameronhunter commented 5 years ago

I'd like to save the contents of a solidarity report to a log file but it's saving the ansi color codes too. I've worked around the problem by piping it through strip-ansi-cli but adding a --no-color option to solidarity would be perfect.

GantMan commented 5 years ago

Awesome, would this be something you're willing to PR?

cameronhunter commented 5 years ago

Following the this down the rabbit hole it turns out to be already supported!

solidarity uses GlueGunPrint which uses colors which supports passing --no-color as a command line parameter.

It's great that this already works but it does feel fragile that a library a couple layers deep is parsing command line parameters. But, hey, the feature is there so thanks!