1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

strip space and ignore empty users from who

This commit is contained in:
James Sapara 2018-06-01 10:37:25 -07:00
parent 779f0a25c3
commit 306e2b0514

View File

@ -59,7 +59,8 @@ func loggedInUsersLinux() []string {
if len(col) > 0 {
for _, cleanedU := range cleaned {
if strings.Compare(cleanedU, col[0]) == 0 {
u := strings.TrimSpace(col[0])
if len(u) == 0 || strings.Compare(cleanedU, col[0]) == 0 {
clean = false
}
}