From 4296d168aa1a5a2e77cc24ecdb523048e0d787ee Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Tue, 26 May 2026 14:18:34 -0700 Subject: [PATCH] Style Signed-off-by: Bryan Frimin --- pkg/deviceagent/checks/checks_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/deviceagent/checks/checks_linux.go b/pkg/deviceagent/checks/checks_linux.go index 67948dcfe..3b2b0cd0a 100644 --- a/pkg/deviceagent/checks/checks_linux.go +++ b/pkg/deviceagent/checks/checks_linux.go @@ -645,9 +645,11 @@ func linuxConsoleUser(ctx context.Context) string { if CommandExists("loginctl") { seat := RunCommand(ctx, "loginctl", "show-seat", "seat0", "-p", "ActiveSession", "--value") + sessionID := strings.TrimSpace(seat.Stdout) if sessionID != "" { name := RunCommand(ctx, "loginctl", "show-session", sessionID, "-p", "Name", "--value") + user := strings.TrimSpace(name.Stdout) if user != "" && user != "root" { return user