From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 27203158013 for ; Mon, 11 Dec 2023 19:30:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA8612BC05E; Mon, 11 Dec 2023 19:30:17 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 90FCC2BC05B for ; Mon, 11 Dec 2023 19:30:17 +0000 (UTC) From: Ulrich Mueller To: Eli Schwartz Cc: gentoo-dev@lists.gentoo.org, =?utf-8?B?TWljaGHFgiBHw7Nybnk=?= Subject: Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: epytest, use NO_COLOR rather than NOCOLOR In-Reply-To: <4c6f48a8-ba55-4ae4-b4fa-ebbaae95c155@gmail.com> (Eli Schwartz's message of "Mon, 11 Dec 2023 13:57:39 -0500") References: <20231202124443.244613-1-mgorny@gentoo.org> <4c6f48a8-ba55-4ae4-b4fa-ebbaae95c155@gmail.com> Date: Mon, 11 Dec 2023 20:30:05 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Archives-Salt: 4ddef782-49d3-40d2-a9e2-805c3c6375b0 X-Archives-Hash: 3d1bbbdc45bce99e692ac1fbab3c6422 --=-=-= Content-Type: text/plain >>>>> 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/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmV3Yz0PHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uClYIAL+5wUHECMVKKOiIpQr5gEDBHroGeBk/0mU7 fzljO87HziNa4WGLW11ZzlGkovoB6x+uqLmjWzNQBxgBpP3p/qLbrsPSivoU+G1h H42WOCdGs8qAx1e1fORM3pzVVlLvgST01e3qHFFjtj4I9q2dHCtlTCNUWfrFUtjH 0IQg4Zb4y2ZbOdniJ9AlzxLZlalUvZtauBvUxvnjnHkOE7XwX0U6fbEzarbDhT3b e8TshIkU1KIeYAG7+SEMULcp860C2CBwRu+3Gni0E/FMXKxe+HDOn/kiquECAons Ctqwq4FWJJ+IX0g2AQTk6qkbDu9fFGckeXkyU+5iSSS+mN2QB7w= =tVW2 -----END PGP SIGNATURE----- --=-=-=--