[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser-build][maint-12.0] Bug 40791: Make sure dmg2mar exits with an error when something failed



Title: GitLab

Richard Pospesel pushed to branch maint-12.0 at The Tor Project / Applications / tor-browser-build

Commits:

  • b7e2bdc3
    by Nicolas Vigier at 2023-02-17T16:42:43+00:00
    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 cf22cd266c5892f683306b84ca6b1363258ed6ae)

1 changed file:

Changes:

  • tools/dmg2mar
    ... ... @@ -106,7 +106,11 @@ sub get_dmg_files_from_sha256sums {
    106 106
     sub convert_files {
    
    107 107
         my ($channel) = @_;
    
    108 108
         my $pm = Parallel::ForkManager->new(get_nbprocs);
    
    109
    -    $pm->run_on_finish(sub { print "Finished $_[2]\n" });
    
    109
    +    $pm->run_on_finish(
    
    110
    +      sub {
    
    111
    +        exit_error "Failed while running $_[2]" unless $_[1] == 0;
    
    112
    +        print "Finished $_[2]\n";
    
    113
    +      });
    
    110 114
         foreach my $file (get_dmg_files_from_sha256sums) {
    
    111 115
             # The 'ja' locale is a special case: it is called 'ja-JP-mac'
    
    112 116
             # internally on OSX, but the dmg file still uses 'ja' to avoid
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits