]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: allow progress to non-TTY after MUA spawn
authorEric Wong <e@80x24.org>
Sat, 3 Apr 2021 01:37:33 +0000 (22:37 -0300)
committerEric Wong <e@80x24.org>
Sat, 3 Apr 2021 05:08:58 +0000 (05:08 +0000)
Sometimes I want to save debug info to a file or pipe even when
spawning an MUA.

lib/PublicInbox/LEI.pm

index cdb4b347e14760226f178c6331a44ec47fb66356..475af8f00899f9cd20f5f7e449280be56f783156 100644 (file)
@@ -849,6 +849,7 @@ sub start_mua {
        if ($self->{lxs} && $self->{au_done}) { # kick wait_startq
                syswrite($self->{au_done}, 'q' x ($self->{lxs}->{jobs} // 0));
        }
+       return unless -t $self->{2}; # XXX how to determine non-TUI MUAs?
        $self->{opt}->{quiet} = 1;
        delete $self->{-progress};
        delete $self->{opt}->{verbose};