From 111c26793a3eef744c1162aa738ad132fc164151 Mon Sep 17 00:00:00 2001 From: phani Date: Tue, 26 Aug 2025 10:51:43 -0400 Subject: [PATCH] ensuring commands require Auth when needed (fix for local build) --- cmd/root.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 6c4ae23..abced72 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -73,10 +73,10 @@ func getKernelClient(cmd *cobra.Command) kernel.Client { // isAuthExempt returns true if the command or any of its parents should skip auth. func isAuthExempt(cmd *cobra.Command) bool { + if cmd == rootCmd { // only 'kernel' with no subcommand + return true + } for c := cmd; c != nil; c = c.Parent() { - if c == rootCmd { - return true - } switch c.Name() { case "login", "logout", "auth", "help", "completion": return true