From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 80C471FF9D for ; Sun, 10 Jan 2021 12:15:20 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 13/22] lei: fix oneshot TTY detection by passing STD*{GLOB} Date: Sun, 10 Jan 2021 12:15:10 +0000 Message-Id: <20210110121519.17044-14-e@80x24.org> In-Reply-To: <20210110121519.17044-1-e@80x24.org> References: <20210110121519.17044-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: ... 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: --- lib/PublicInbox/LEI.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }