diff options
author | Eric Wong <e@80x24.org> | 2023-10-27 22:21:13 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-28 09:08:18 +0000 |
commit | 73830410e4336b779c820e90a8604e9e74f38b90 (patch) | |
tree | 92962cefd15d77edb12c57d08cc89b0d37110d67 /lib/PublicInbox/LEI.pm | |
parent | ef5bd67cbcdcd8cba2cb8b3718ea90afda6b7ebe (diff) | |
download | public-inbox-73830410e4336b779c820e90a8604e9e74f38b90.tar.gz |
This saves us some code, and is a small step towards getting ProcessIO working with stat, fcntl and other perlops that don't work with tied handles.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index e060bcbe..0f6f7f6f 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -19,7 +19,7 @@ use IO::Handle (); use Fcntl qw(SEEK_SET); use PublicInbox::Config; use PublicInbox::Syscall qw(EPOLLIN); -use PublicInbox::Spawn qw(run_wait popen_rd); +use PublicInbox::Spawn qw(run_wait popen_rd run_qx); use PublicInbox::Lock; use PublicInbox::Eml; use PublicInbox::Import; @@ -1091,9 +1091,8 @@ sub path_to_fd { # caller needs to "-t $self->{1}" to check if tty sub start_pager { my ($self, $new_env) = @_; - my $fh = popen_rd([qw(git var GIT_PAGER)]); - chomp(my $pager = <$fh> // ''); - close($fh) or warn "`git var PAGER' error: \$?=$?"; + chomp(my $pager = run_qx([qw(git var GIT_PAGER)])); + warn "`git var PAGER' error: \$?=$?" if $?; return if $pager eq 'cat' || $pager eq ''; $new_env //= {}; $new_env->{LESS} //= 'FRX'; |