unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] lei_view_text: fix inverted condition
@ 2023-11-03 20:25 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-11-03 20:25 UTC (permalink / raw)
  To: meta

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;
 	}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-03 20:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-03 20:25 [PATCH] lei_view_text: fix inverted condition Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).