avoid nil cmd
This commit is contained in:
parent
0d48e8de59
commit
3ef5687070
1 changed files with 2 additions and 1 deletions
|
|
@ -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 != "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue