]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: fix oneshot TTY detection by passing STD*{GLOB}
authorEric Wong <e@80x24.org>
Sun, 10 Jan 2021 12:15:10 +0000 (12:15 +0000)
committerEric Wong <e@80x24.org>
Tue, 12 Jan 2021 03:51:42 +0000 (03:51 +0000)
...  instead of STD*{IO}.  I'm not sure why *STDOUT{IO} being an
IO::File object disqualifies it from the "-t" perlop check
returning true on TTY, but it does.  So use *STDOUT{GLOB} for
now.

http://nntp.perl.org/group/perl.perl5.porters/258760
Message-ID: <X/kgIqIuh4ZtUZNR@dcvr>

lib/PublicInbox/LEI.pm

index 24f5930bdab58297d0e87263d68e2ca7a7d3f0ff..170231917ccf167ad7bb46842237181b66d259c6 100644 (file)
@@ -795,9 +795,9 @@ sub oneshot {
        local %PATH2CFG;
        umask(077) // die("umask(077): $!");
        dispatch((bless {
-               0 => *STDIN{IO},
-               1 => *STDOUT{IO},
-               2 => *STDERR{IO},
+               0 => *STDIN{GLOB},
+               1 => *STDOUT{GLOB},
+               2 => *STDERR{GLOB},
                env => \%ENV
        }, __PACKAGE__), @ARGV);
 }