Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down