Skip to content

Commit

Permalink
PAUSE::dist: do not include private errors in report
Browse files Browse the repository at this point in the history
This case doesn't come up yet, and wasn't handled properly.  This code
will better handle private errors, and also errors with a header and no
body.
  • Loading branch information
rjbs committed Jun 22, 2024
1 parent 393a5ea commit 6758a60
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions lib/PAUSE/dist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,22 @@ sub mail_summary {
for my $error (@dist_errors) {
my $header = $error->{header};
my $body = $error->{body};
$body = $body->($self) if ref $body;

push @m, "## $header\n\n";
push @m, $tf->format($body), qq{\n\n};
if ($error->{public}) {
$body = $body->($self) if ref $body;

unless ($body) {
$Logger->log([
"encountered dist error with no body: %s",
$error->{header},
]);

$body = "No further information about this error is available.";
}

push @m, "## $header\n\n";
push @m, $tf->format($body), qq{\n\n};
}

$status_over_all = "Failed";
}
Expand Down

0 comments on commit 6758a60

Please sign in to comment.