by bombolo · 3y ago · 0 comments
Call isatty()!
I don't know anything about terraform, but I've written some applications where I intentionally don't automatically change the output (which in my case is usually bold text, I don't use colours much) because I expect no one will ever use the output for scripting . That's not "poor programming", it's a choice because there is no perfect solution that fits 100% of the cases.
I suspect that may probably be the best choice for terraform as well, but I never used it.
Imagine grep not working because in between the words that you are searching there is an escape code.