append newline to tty when done
cargo devel CI / cargo CI (push) Successful in 22s Details

This commit is contained in:
Christoph J. Scherr 2024-02-21 14:47:32 +01:00
parent 145dfc598b
commit 4ca5ab26cd
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,8 @@ fn main() -> Result<(), io::Error> {
.write_all(&buf[..read_amount])
.inspect_err(|err| eprintln!("{err}"))?;
}
tty.write(b"\n").inspect_err(|err| eprintln!("{err}"))?; // otherwise weird wrapped together
// lines may happen
tty.flush().inspect_err(|err| eprintln!("{err}"))?; // make sure it comes there
stdout.flush().inspect_err(|err| eprintln!("{err}"))?; // make sure it comes there
Ok(())