MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / shouldSkipUpdateCheck

Function shouldSkipUpdateCheck

cmd/root.go:526–547  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

524}
525
526func shouldSkipUpdateCheck(cmd *cobra.Command) bool {
527 if cmd == nil {
528 return false
529 }
530
531 for current := cmd; current != nil; current = current.Parent() {
532 switch current.Name() {
533 case "help", "completion", "version":
534 return true
535 }
536
537 if current.Annotations != nil && current.Annotations["skipUpdateCheck"] == "true" {
538 return true
539 }
540 }
541
542 if helpFlag := cmd.Flags().Lookup("help"); helpFlag != nil && helpFlag.Changed {
543 return true
544 }
545
546 return false
547}

Callers 2

checkIfUpdateNeededFunction · 0.85

Calls 1

LookupMethod · 0.80

Tested by 1