1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-16 18:21:01 +00:00

mv: return err if response is negative when moving a dir to existing dest during an interactive mode

This commit is contained in:
John Shin 2023-05-03 16:05:21 -07:00
parent a97199f72a
commit 1c8aac0883
2 changed files with 22 additions and 1 deletions

View file

@ -292,7 +292,7 @@ fn exec(files: &[OsString], b: &Behavior) -> UResult<()> {
OverwriteMode::NoClobber => return Ok(()),
OverwriteMode::Interactive => {
if !prompt_yes!("overwrite {}? ", target.quote()) {
return Ok(());
return Err(io::Error::new(io::ErrorKind::Other, "").into());
}
}
OverwriteMode::Force => {}