diff --git a/users/users.rs b/users/users.rs index b8c28eb68..496db81b9 100644 --- a/users/users.rs +++ b/users/users.rs @@ -139,6 +139,8 @@ fn exec(filename: &str) { endutent(); } - users.sort(); - println!("{}", users.connect(" ")); + if users.len() > 0 { + users.sort(); + println!("{}", users.connect(" ")); + } }