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:
parent
81ffdc783c
commit
6d59974fed
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user