Skip to content

Commit

Permalink
cron/cron-daily.pl: if there is no 08pumpkings, do not fail
Browse files Browse the repository at this point in the history
08pumpkins will not exist on the first run of the daily cron job.

That is okay!  Just treat it as if the file had been empty.
  • Loading branch information
rjbs committed Apr 26, 2024
1 parent 4776b46 commit 017642c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cron/cron-daily.pl
Original file line number Diff line number Diff line change
Expand Up @@ -755,13 +755,16 @@ sub pumpkings {
my $repfile = "$PAUSE::Config->{MLROOT}/../08pumpkings.txt.gz";
my $list = "";
my $olist = "";
local ($/) = undef;
if (open F, "$zcat $repfile|") {
if ($] > 5.007) {
binmode F, ":utf8";

if (-e $repfile) {
local ($/) = undef;
if (open F, "$zcat $repfile|") {
if ($] > 5.007) {
binmode F, ":utf8";
}
$olist = <F>;
close F;
}
$olist = <F>;
close F;
}

my @pumpkings;
Expand Down

0 comments on commit 017642c

Please sign in to comment.