diff --git a/src/cli/prune.rs b/src/cli/prune.rs index 386fe6d4e5..c5b23be0a7 100644 --- a/src/cli/prune.rs +++ b/src/cli/prune.rs @@ -64,7 +64,8 @@ impl Prune { if self.dry_run { pr.set_prefix(format!("{} {} ", pr.prefix(), style("[dryrun]").bold())); } - if config.settings.yes || prompt::confirm(&format!("remove {} ?", &tv))? { + if self.dry_run || config.settings.yes || prompt::confirm(&format!("remove {} ?", &tv))? + { p.decorate_progress_bar(&mut pr, Some(&tv)); p.uninstall_version(config, &tv, &pr, self.dry_run)?; pr.finish(); diff --git a/src/config/tracking.rs b/src/config/tracking.rs index 51ecd2ef47..f708e34a5b 100644 --- a/src/config/tracking.rs +++ b/src/config/tracking.rs @@ -40,6 +40,9 @@ impl Tracker { let mut output = vec![]; for path in read_dir(&self.tracking_dir)? { let path = path?.path(); + if !path.is_symlink() { + continue; + } let path = fs::read_link(path)?; if path.exists() { output.push(path);