Skip to content

Commit 111c267

Browse files
committed
ensuring commands require Auth when needed (fix for local build)
1 parent 404b4a0 commit 111c267

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ func getKernelClient(cmd *cobra.Command) kernel.Client {
7373

7474
// isAuthExempt returns true if the command or any of its parents should skip auth.
7575
func isAuthExempt(cmd *cobra.Command) bool {
76+
if cmd == rootCmd { // only 'kernel' with no subcommand
77+
return true
78+
}
7679
for c := cmd; c != nil; c = c.Parent() {
77-
if c == rootCmd {
78-
return true
79-
}
8080
switch c.Name() {
8181
case "login", "logout", "auth", "help", "completion":
8282
return true

0 commit comments

Comments
 (0)