From: Eric Wong Date: Sun, 10 Jan 2021 12:15:10 +0000 (+0000) Subject: lei: fix oneshot TTY detection by passing STD*{GLOB} X-Git-Tag: v1.7.0~1386 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=372ff2ba6467e8fcea3eb19e5527a5fc398802f9;p=public-inbox.git lei: fix oneshot TTY detection by passing STD*{GLOB} ... 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: --- diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 24f5930b..17023191 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -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); }