avoid nil cmd

This commit is contained in:
vilmibm 2020-08-19 10:10:49 -05:00
parent 0d48e8de59
commit 3ef5687070

View file

@ -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 != "" {