]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiQuery.pm
lei q: fix --import-before default and FIFO output
[public-inbox.git] / lib / PublicInbox / LeiQuery.pm
index 743fa3f7b23600874f008ffdc9833273515529e9..623b92cdb78c3893de9c9cfcc7475261a5a160e0 100644 (file)
@@ -51,6 +51,10 @@ sub lei_q {
        # we'll allow "--only $LOCATION --local"
        my $sto = $self->_lei_store(1);
        my $lse = $sto->search;
+       if (($opt->{'import-remote'} //= 1) |
+                       (($opt->{'import-before'} //= \1) ? 1 : 0)) {
+               $sto->write_prepare($self);
+       }
        if ($opt->{'local'} //= scalar(@only) ? 0 : 1) {
                $lxs->prepare_external($lse);
        }