From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1ED6C1F406 for ; Fri, 3 Nov 2023 20:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1699043108; bh=uisUPEWcAZSlhiqAj5P1e3JlCeSZAY0/Jb7Gvaf/d5A=; h=From:To:Subject:Date:From; b=kjNsmSRQvS/joIpnMFSxkO+WCrolserzVcgoGDvXJZz9OfRnHta+VHqNJoGBOhYaP POCs5/yNHwH1CAMvFE2zE/N9nS24ozbs1F5Ffb3bmtNjTalOvMBmgNSV0/ND2UXiWF W7a6CajWOMuX7MoVr/rtcinpH5CSUs/uCMtJH6LQ= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_view_text: fix inverted condition Date: Fri, 3 Nov 2023 20:25:07 +0000 Message-ID: <20231103202507.727582-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This was causing `lei q -f text' output to be uncolored on color-capable terminals. Fixes: d3c55d072839 (treewide: use ->close to call ProcessIO->CLOSE) --- lib/PublicInbox/LeiViewText.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiViewText.pm b/lib/PublicInbox/LeiViewText.pm index ce9f248e..c7d72c71 100644 --- a/lib/PublicInbox/LeiViewText.pm +++ b/lib/PublicInbox/LeiViewText.pm @@ -75,7 +75,7 @@ sub new { my @cmd = qw(git config -z --includes -l); # reuse normal git config my $r = popen_rd(\@cmd, undef, { 2 => $lei->{2} }); my $cfg = PublicInbox::Config::config_fh_parse($r, "\0", "\n"); - if ($r->close) { + if (!$r->close) { warn "# @cmd failed, no color (non-fatal \$?=$?)\n"; return $self; }