Skip to content

Commit 7f05c79

Browse files
committed
correct log arg
1 parent 4342dbe commit 7f05c79

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/zrok/enable.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ func (cmd *enableCommand) run(_ *cobra.Command, args []string) {
6262
} else {
6363
username = os.Getenv("USER")
6464
if username == "" {
65-
username = fmt.Sprintf("user-%d", os.Geteuid())
66-
logrus.Warnf("unable to determine the current user, using effective UID: %v", err)
65+
euid := os.Geteuid()
66+
username = fmt.Sprintf("user-%d", euid)
67+
logrus.Warnf("unable to determine the current user, using effective UID: %v", euid)
6768
}
6869
}
6970
hostDetail = fmt.Sprintf("%v; %v", username, hostDetail)

0 commit comments

Comments
 (0)