File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ func runQuery(opts *repo.QueryOpts) error {
110
110
if err != nil {
111
111
return errors .Wrap (err , "creating repo client" )
112
112
}
113
+ rc .TokenPath = rootOpts .TokenPath
113
114
114
115
return rc .Query (opts )
115
116
}
Original file line number Diff line number Diff line change @@ -110,8 +110,11 @@ func (r *Repo) Query(opts *QueryOpts) error {
110
110
fmt .Fprintf (r .Out , "Searching for KEPs...\n " )
111
111
}
112
112
113
- if tokenErr := r .SetGitHubToken (r .TokenPath ); tokenErr != nil {
114
- return errors .Wrapf (tokenErr , "setting GitHub token" )
113
+ if r .TokenPath != "" {
114
+ logrus .Infof ("Setting GitHub token: %v" , r .TokenPath )
115
+ if tokenErr := r .SetGitHubToken (r .TokenPath ); tokenErr != nil {
116
+ return errors .Wrapf (tokenErr , "setting GitHub token" )
117
+ }
115
118
}
116
119
117
120
allKEPs := make ([]* api.Proposal , 0 , 10 )
You can’t perform that action at this time.
0 commit comments