This commit is contained in:
parent
b93d36dacd
commit
2adb82a1b3
4
main.go
4
main.go
@ -132,11 +132,11 @@ func checkRunAsRoot() {
|
||||
currUser, err := user.Current()
|
||||
var msg string
|
||||
if err != nil {
|
||||
msg = "Unable to determine which user is running the application, but is not being run by root"
|
||||
msg = "Unable to determine which user is running the application."
|
||||
} else {
|
||||
msg = fmt.Sprintf("Running as user: %s, %s", currUser.Uid, currUser.Username)
|
||||
}
|
||||
fmt.Println(blue + msg + reset)
|
||||
fmt.Println(blue + msg + "\nRunning as non-root user" + reset)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user