]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei_view_text: fix inverted condition
authorEric Wong <e@80x24.org>
Fri, 3 Nov 2023 20:25:07 +0000 (20:25 +0000)
committerEric Wong <e@80x24.org>
Sat, 4 Nov 2023 00:41:14 +0000 (00:41 +0000)
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

index ce9f248eafe54c7db8c8119f90240013972181dd..c7d72c71cf464a1318752cdc9af53c8114ec458a 100644 (file)
@@ -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;
        }