diff --git a/cmd/gh/main.go b/cmd/gh/main.go index 0d4aa3761..9540550a0 100644 --- a/cmd/gh/main.go +++ b/cmd/gh/main.go @@ -52,7 +52,6 @@ func main() { } cmd, _, err := rootCmd.Traverse(expandedArgs) - _, skipAuthCheck := cmd.Annotations["skipAuthCheck"] if err != nil || cmd == rootCmd { originalArgs := expandedArgs isShell := false @@ -94,6 +93,8 @@ func main() { } } + _, skipAuthCheck := cmd.Annotations["skipAuthCheck"] + // TODO support other names ghtoken := os.Getenv("GITHUB_TOKEN") if ghtoken != "" {