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

Merge pull request #118 from interlock/issue-117

strip space and ignore empty users from who
This commit is contained in:
Chris Cummer 2018-06-01 12:02:27 -07:00 committed by GitHub
commit 3555ff3856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,8 @@ func loggedInUsersLinux() []string {
if len(col) > 0 { if len(col) > 0 {
for _, cleanedU := range cleaned { 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 clean = false
} }
} }