about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiOverview.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-04 00:59:24 -0900
committerEric Wong <e@80x24.org>2021-02-05 00:16:30 +0000
commit52e864b5e7e45eafe559a28bad70b2f23fad7bf9 (patch)
tree688a1f6ed74825b86fd7d9ab7ab2b3d1b4bae209 /lib/PublicInbox/LeiOverview.pm
parent7d440bf3667b8ef5f44266b92b94384694de33e0 (diff)
downloadpublic-inbox-52e864b5e7e45eafe559a28bad70b2f23fad7bf9.tar.gz
No need to be starting a pager if we're writing to a regular file.
Diffstat (limited to 'lib/PublicInbox/LeiOverview.pm')
-rw-r--r--lib/PublicInbox/LeiOverview.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm
index e6bf4f2a..3125f015 100644
--- a/lib/PublicInbox/LeiOverview.pm
+++ b/lib/PublicInbox/LeiOverview.pm
@@ -78,9 +78,8 @@ sub new {
         if ($fmt =~ /\A($JSONL|(?:concat)?json)\z/) {
                 $json = $self->{json} = ref(PublicInbox::Config->json);
         }
-        my ($isatty, $seekable);
         if ($dst eq '/dev/stdout') {
-                $isatty = -t $lei->{1};
+                my $isatty = $lei->{need_pager} = -t $lei->{1};
                 $opt->{pretty} //= $isatty;
                 if (!$isatty && -f _) {
                         my $fl = fcntl($lei->{1}, F_GETFL, 0) //