air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
17.63k stars 802 forks source link

Support forcing color #417

Open assembled-jesse opened 1 year ago

assembled-jesse commented 1 year ago

fatih/color disables colors if the output isn't a tty. The accepted way of dealing with this seems to be for the program using color to expose a flag and hard-override https://github.com/fatih/color/issues/179

Some sort of flag for this would be really appreciated, but not really a deal-breaker tbh. Thanks!

Matthewaj commented 8 months ago

For anyone who wants a temporary work around and is using Mac OS or Linux, unbuffer from the expect package makes it appear like air is running from a tty.

Just simply run unbuffer air

https://formulae.brew.sh/formula/expect