mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
mv: ensure line prints (#1890)
Previously this used `print` instead of `println`, and as a result the prompt would never appear and the command would hang. The Rust docs note this about print: > Note that stdout is frequently line-buffered by default so it may be > necessary to use io::stdout().flush() to ensure the output is emitted > immediately. Changing to `println` fixes the issue. Fixes #1889. Co-authored-by: Kevin Burke <kevin@burke.dev>
This commit is contained in:
parent
b54f0b1ff2
commit
4873c8a24b
1 changed files with 1 additions and 1 deletions
|
@ -380,7 +380,7 @@ fn rename(from: &PathBuf, to: &PathBuf, b: &Behavior) -> io::Result<()> {
|
|||
match b.overwrite {
|
||||
OverwriteMode::NoClobber => return Ok(()),
|
||||
OverwriteMode::Interactive => {
|
||||
print!("{}: overwrite ‘{}’? ", executable!(), to.display());
|
||||
println!("{}: overwrite ‘{}’? ", executable!(), to.display());
|
||||
if !read_yes() {
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue