1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-02 22:17:45 +00:00

Merge pull request #618 from jbcrail/fix-flush-bug-for-echo

Fix failure to print stdout for echo.
This commit is contained in:
Heather 2015-05-23 09:06:38 +03:00
commit 825444aa13

View file

@ -12,6 +12,7 @@
extern crate getopts; extern crate getopts;
extern crate libc; extern crate libc;
use std::io::{stdout, Write};
use std::str::from_utf8; use std::str::from_utf8;
#[path = "../common/util.rs"] #[path = "../common/util.rs"]
@ -242,7 +243,9 @@ pub fn uumain(args: Vec<String>) -> i32 {
} }
} }
if !options.newline { if options.newline {
let _ = stdout().flush();
} else {
println!("") println!("")
} }