public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Eli Schwartz <eschwartz93@gmail.com>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: epytest, use NO_COLOR rather than NOCOLOR
Date: Mon, 11 Dec 2023 15:21:29 -0500	[thread overview]
Message-ID: <24d59a88-071d-49ce-9376-9a3193b27693@gmail.com> (raw)
In-Reply-To: <uy1e0r0zm@gentoo.org>

On 12/11/23 2:30 PM, Ulrich Mueller wrote:
>>>>>> On Mon, 11 Dec 2023, Eli Schwartz wrote:
> 
>>> +	local color=yes
>>> +	[[ ${NO_COLOR} ]] && color=no
> 
>> [[ -v NO_COLOR ]]
> 
> No, this would give the wrong result if NO_COLOR is set to an empty
> value. [[ ${NO_COLOR} ]] or [[ -n ${NO_COLOR} ]] is the correct test:
> 
>    "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." -- https://no-color.org/


Again, not according to pytest itself. ;)

Given the commit message says:

"""
Adjust it to correctly check whether it is set at all rather than to a
specific value, to match the behavior of pytest itself.
"""


-- 
Eli Schwartz



  reply	other threads:[~2023-12-11 20:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02 12:44 [gentoo-dev] [PATCH] python-utils-r1.eclass: epytest, use NO_COLOR rather than NOCOLOR Michał Górny
2023-12-11 18:57 ` Eli Schwartz
2023-12-11 19:27   ` Michał Górny
2023-12-11 20:22     ` Eli Schwartz
2023-12-11 19:30   ` Ulrich Mueller
2023-12-11 20:21     ` Eli Schwartz [this message]
2023-12-11 20:38       ` Ulrich Mueller
2023-12-11 21:11         ` Toralf Förster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24d59a88-071d-49ce-9376-9a3193b27693@gmail.com \
    --to=eschwartz93@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.org \
    --cc=ulm@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox