Added check to prune

main
Michal 2 years ago
parent 0910c2e78c
commit 4305937589

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

Loading…
Cancel
Save