Commit b7e2bdc3 authored by boklm's avatar boklm Committed by Richard Pospesel
Browse files

Bug 40791: Make sure dmg2mar exits with an error when something failed

If the child process failed, make sure we exit with an error in the
parent process too.


(cherry picked from commit cf22cd26)
parent f50bc8b7
Loading
Loading
Loading
Loading
+5 −1
Changes for tools/dmg2mar: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -106,7 +106,11 @@ sub get_dmg_files_from_sha256sums {
sub convert_files {
    my ($channel) = @_;
    my $pm = Parallel::ForkManager->new(get_nbprocs);
    $pm->run_on_finish(sub { print "Finished $_[2]\n" });
    $pm->run_on_finish(
      sub {
        exit_error "Failed while running $_[2]" unless $_[1] == 0;
        print "Finished $_[2]\n";
      });
    foreach my $file (get_dmg_files_from_sha256sums) {
        # The 'ja' locale is a special case: it is called 'ja-JP-mac'
        # internally on OSX, but the dmg file still uses 'ja' to avoid