Added check to prune

main
Michal 2 years ago
parent 68e12aa959
commit 0cf709bc90
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -109,8 +109,12 @@ pub fn prune(verbose: bool) {
log!(verbose, "Current dir: {:?}", env::current_dir().unwrap());
// Print which packages were deleted
info!("Deleted the following packages:");
for p in packages_to_delete.iter_mut() {
info!("{}-{}", p.name.replace("./", ""), p.ver);
if !packages_to_delete.is_empty() {
info!("Deleted the following packages:");
for p in packages_to_delete.iter_mut() {
info!("{}-{}", p.name.replace("./", ""), p.ver);
}
} else {
info!("No packages were deleted.");
}
}

Loading…
Cancel
Save