fix: respect NO_COLOR and TERM=dumb environment variables#764
Merged
djc merged 1 commit intoconsole-rs:mainfrom Feb 4, 2026
Merged
fix: respect NO_COLOR and TERM=dumb environment variables#764djc merged 1 commit intoconsole-rs:mainfrom
djc merged 1 commit intoconsole-rs:mainfrom
Conversation
djc
reviewed
Feb 4, 2026
eed5812 to
92be8a4
Compare
djc
approved these changes
Feb 4, 2026
Member
djc
left a comment
There was a problem hiding this comment.
I like it! @chris-laplante is there anything I'm missing here?
Collaborator
Looks nice and simple to me :) |
djc
approved these changes
Feb 4, 2026
Contributor
Author
|
Thanks y'all :) |
|
Thanks! Any chance we could get a release for this? |
Member
|
We can definitely do a release soon. There's one more potential fix I'd like to wait for (if it doesn't take too long). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #763
Changes
is_hidden()anddrawable()to checkterm.features().colors_supported()instead ofterm.is_term(). Theconsolecrate'scolors_supported()already checks forNO_COLORandTERM=dumb, so this change makes indicatif respect those signals.Test plan
Use the MRE from #763 with a path dependency:
scriptcreates a pseudo-TTY soisatty()returns true. Grepping for1b 5b(hexESC[) detects ANSI escape sequences. With the fix, no output should appear whenTERM=dumborNO_COLOR=1.