Skip to content

Commit 4f276f3

Browse files
author
oech3
committed
users: Avoid > /dev/full panic
1 parent 8041772 commit 4f276f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/uu/users/src/users.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// spell-checker:ignore (paths) wtmp
77

88
use std::ffi::OsString;
9+
use std::io::{Write, stdout};
910
use std::path::Path;
1011

1112
use clap::builder::ValueParser;
@@ -73,7 +74,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
7374

7475
if !users.is_empty() {
7576
users.sort();
76-
println!("{}", users.join(" "));
77+
writeln!(stdout().lock(), "{}", users.join(" "))?;
7778
}
7879

7980
Ok(())

0 commit comments

Comments
 (0)