]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiInput.pm
lei import: fix --mail-sync handling in LeiInput
[public-inbox.git] / lib / PublicInbox / LeiInput.pm
index 86f300c3a572438ac01e475ecaca2ad58c419011..9bcc86e1cacf77c1b18f0302fc2b788bbd4123bc 100644 (file)
@@ -204,7 +204,7 @@ sub prepare_http_input ($$$) {
 sub prepare_inputs { # returns undef on error
        my ($self, $lei, $inputs) = @_;
        my $in_fmt = $lei->{opt}->{'in-format'};
-       my $sync = $lei->{opt}->{sync} ? {} : undef; # using LeiMailSync
+       my $sync = $lei->{opt}->{'mail-sync'} ? {} : undef; # using LeiMailSync
        if ($lei->{opt}->{stdin}) {
                @$inputs and return
                        $lei->fail("--stdin and @$inputs do not mix");
@@ -286,11 +286,11 @@ $input is `eml', not --in-format=$in_fmt
        }
        if ($sync && $sync->{no}) {
                return $lei->fail(<<"") if !$sync->{ok};
---sync specified but no inputs support it
+--mail-sync specified but no inputs support it
 
                # non-fatal if some inputs support support sync
-               $lei->err("# --sync will only be used for @{$sync->{ok}}");
-               $lei->err("# --sync is not supported for: @{$sync->{no}}");
+               $lei->err("# --mail-sync will only be used for @{$sync->{ok}}");
+               $lei->err("# --mail-sync is not supported for: @{$sync->{no}}");
        }
        if ($net) {
                $net->{-can_die} = 1;