]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei up: propagate redispatch_all failure via exit code
authorEric Wong <e@80x24.org>
Tue, 19 Oct 2021 09:33:39 +0000 (09:33 +0000)
committerEric Wong <e@80x24.org>
Tue, 19 Oct 2021 17:29:17 +0000 (17:29 +0000)
We can still continue with some local externals, maybe;
but the error needs to be propagated to the calling process
for scripting purposes.

lib/PublicInbox/LeiUp.pm

index 4fd0290c76124212376de4ab6b061578b2f88472..fcdd535dc118cfec8b198559ff6a224a151ba1b1 100644 (file)
@@ -124,7 +124,7 @@ sub net_merge_all_done {
        $lei->{net} = delete($self->{-net_new}) if $self->{-net_new};
        $self->wq_close;
        eval { redispatch_all($self, $lei) };
-       warn "E: $@" if $@;
+       $lei->child_error(0, "E: $@") if $@;
 }
 
 sub _complete_up { # lei__complete hook