Fix NO_COLOR spec compliance for empty-string edge case#20
Open
assisted-by-ai wants to merge 1 commit into
Open
Fix NO_COLOR spec compliance for empty-string edge case#20assisted-by-ai wants to merge 1 commit into
assisted-by-ai wants to merge 1 commit into
Conversation
- NO_COLOR check now disables color when the variable is present regardless of value, per the no-color.org spec. Previously only NO_COLOR=1 was honored. - Fix transposed "ji" → "ij" in test_clean_ascii alphabet string. - Update test_pty_color to expect no-color output when NO_COLOR=0, matching the corrected behavior. https://claude.ai/code/session_014Qvwfhuw1DH4BJNdzrM6x1
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.
Summary
not os.getenv("NO_COLOR")toos.getenv("NO_COLOR") is Nonein the color detection logic. The previous check treatedNO_COLOR=""as falsy, keeping color enabled. Per the no-color.org spec, the mere presence ofNO_COLOR(regardless of value) should disable color.NO_COLOR=0asserting that color is disabled, validating spec-compliant behavior.Test plan
unicode_showtest suite — all existing tests pass, newNO_COLOR=0case passesNO_COLOR="",NO_COLOR=0,NO_COLOR=1all suppress color outputNO_COLORallows color output on a TTYhttps://claude.ai/code/session_014Qvwfhuw1DH4BJNdzrM6x1
Generated by Claude Code