You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting ENV["NO_COLOR"] = "1" inside Ruby does not disable colors #3
> ruby test.rb
HELLO (in yellow)
> NO_COLOR=1 ruby test.rb
HELLO (not colored)
> ruby test.rb no
Disabling colors
HELLO (in yellow)
Ultimatley, I'm trying to disable colors during a test. By the time my code runs, even in a test, whatever Lipgloss does to decide if colors should be used has been decided as "yes". In the go version's faq, it implies you can call lipgloss.SetColorProfile(termenv.TrueColor) (or some other value from termenv) to force its behavior. Is this possible with the Ruby version?
Hey @davetron5000, thanks for reporting! That's a good question!
Right now we don't have an equivalent API to do what the go version does. That said, I'm happy to see if we can make that work, either be providing the needed Ruby glue code or by adding proper bindings to the Go method.
I'm assuming that the ENV variable is read at require time and that this might be why it's behaving in the way it does right now.
Activity
marcoroth commentedon Feb 17, 2026
Hey @davetron5000, thanks for reporting! That's a good question!
Right now we don't have an equivalent API to do what the go version does. That said, I'm happy to see if we can make that work, either be providing the needed Ruby glue code or by adding proper bindings to the Go method.
I'm assuming that the ENV variable is read at require time and that this might be why it's behaving in the way it does right now.