(cmd *cobra.Command)
| 505 | } |
| 506 | |
| 507 | func shouldSkipSubscriptionCheck(cmd *cobra.Command) bool { |
| 508 | if JSONOutput { |
| 509 | return true |
| 510 | } |
| 511 | if cmd == nil { |
| 512 | return true |
| 513 | } |
| 514 | for current := cmd; current != nil; current = current.Parent() { |
| 515 | switch current.Name() { |
| 516 | case "help", "completion", "version", "login", "logout": |
| 517 | return true |
| 518 | } |
| 519 | } |
| 520 | if helpFlag := cmd.Flags().Lookup("help"); helpFlag != nil && helpFlag.Changed { |
| 521 | return true |
| 522 | } |
| 523 | return false |
| 524 | } |
| 525 | |
| 526 | func shouldSkipUpdateCheck(cmd *cobra.Command) bool { |
| 527 | if cmd == nil { |
no test coverage detected