Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ANSI color when NO_COLOR is an empty string #21

Merged
merged 1 commit into from
Aug 20, 2023

Conversation

superatomic
Copy link
Contributor

The NO_COLOR standard specifies that color should not be prevented when the NO_COLOR environment variable is an empty string:

Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an empty string (regardless of its value), prevents the addition of ANSI color.

This behavior is not reflected by click-help-colors, which will incorrectly remove colors when NO_COLOR=''. This PR fixes this issue.

@r-m-n
Copy link
Member

r-m-n commented Aug 20, 2023

Thanks!

@r-m-n r-m-n merged commit e269355 into click-contrib:master Aug 20, 2023
clrpackages referenced this pull request in clearlinux-pkgs/pypi-click_help_colors Aug 22, 2023
….1 to version 0.9.2

[0.9.2]
-------------------------------
- Enable ANSI color when NO_COLOR is an empty string. `PR #21 <https://github.com/click-contrib/click-help-colors/pull/21>`_
- Add non-colored suffix to _colorize for 'usage' `PR #18 <https://github.com/click-contrib/click-help-colors/pull/18>`_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants