From 5262c043f3154175be1655f77f8520317ddcacc3 Mon Sep 17 00:00:00 2001 From: Niyaz Nigmatullin Date: Wed, 22 Jun 2022 19:54:37 +0300 Subject: [PATCH] uu_install: add 'removed file' message on overwriting file --- src/uu/install/src/install.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index 6750560d2..bd853e26c 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -585,6 +585,9 @@ fn copy(from: &Path, to: &Path, b: &Behavior) -> UResult<()> { // The codes actually making use of the backup process don't seem to agree // on how best to approach the issue. (mv and ln, for example) if to.exists() { + if b.verbose { + println!("removed {}", to.quote()); + } backup_path = backup_control::get_backup_path(b.backup_mode, to, &b.suffix); if let Some(ref backup_path) = backup_path { // TODO!!