Skip to content

Commit

Permalink
Merge pull request #1167 from metacpan/haarg/latest-only-purge-updates
Browse files Browse the repository at this point in the history
latest - only purge dists being upgraded or downgraded
  • Loading branch information
mickeyn authored Feb 23, 2024
2 parents 26d585d + b917b7a commit b9a7611
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Script/Latest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ sub run {
eval { $p->package( $_->{name} ) }
} @{ $file_data->{module} };

push @modules_to_purge, @modules;

# For each of the packages in this file...
foreach my $module (@modules) {

Expand Down Expand Up @@ -204,9 +202,11 @@ sub run {
)
);
$upgrade{ $file_data->{distribution} } = $file_data;
push @modules_to_purge, @modules;
}
elsif ( $file_data->{status} eq 'latest' ) {
$downgrade{ $file_data->{release} } = $file_data;
push @modules_to_purge, @modules;
}
}
}
Expand Down

0 comments on commit b9a7611

Please sign in to comment.