From c4e83c26e632cb9c2bc2e025c6988534ac5d1a1e Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Thu, 29 May 2025 11:17:28 +0100 Subject: [PATCH] guard: avoid duplicating error logs Signed-off-by: oppiliappan --- guard/guard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guard/guard.go b/guard/guard.go index 864ea3ad..15d13445 100644 --- a/guard/guard.go +++ b/guard/guard.go @@ -87,7 +87,7 @@ func Run(ctx context.Context, cmd *cli.Command) error { if sshCommand == "" { l.Error("access denied: no interactive shells", "user", incomingUser) fmt.Fprintln(os.Stderr, "access denied: we don't serve interactive shells :)") - return fmt.Errorf("access denied: no interactive shells") + os.Exit(-1) } cmdParts := strings.Fields(sshCommand) -- 2.51.2