fix(cli): handle terminals with limited color support#4458
Merged
sasa-tomic merged 2 commits intomasterfrom Jan 14, 2026
Merged
fix(cli): handle terminals with limited color support#4458sasa-tomic merged 2 commits intomasterfrom
sasa-tomic merged 2 commits intomasterfrom
Conversation
|
Thank you! I remember @viviveevee and someone else commenting on my question in the dfiniy slack, but I no longer have access to check who. |
viviveevee
approved these changes
Jan 14, 2026
Contributor
viviveevee
left a comment
There was a problem hiding this comment.
Please add a changelog entry, otherwise good to merge. Thanks!
### Motivation - `term` crate panicked on terminals lacking color support. ### Solution - Swap `term` crate for raw ANSI escape codes. - Emit color only if TTY and `NO_COLOR` is unset. - Delete obsolete `stderr_wrapper` module.
6ebc298 to
7ad656d
Compare
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.
Motivation
termcrate panics in CI environments lacking full terminal capabilities.Solution
termdependency; usestd::io::IsTerminalfor detection. The term crate's "robustness" caused this bug - it queries terminfo and refuses to set colors if the terminal reports limited capabilities. This is "correct" but brittle - users hit ColorOutOfRange in some environments.NO_COLORenv var: https://no-color.org/