Add comment explaining error handling in listRun
Added a comment to clarify why the error from opts.BaseRepo() is ignored in listRun. This provides context for handling cases when the current working directory is not a repo and --repo is not set.
This commit is contained in:
parent
4a07cdf940
commit
227f0bd01d
1 changed files with 2 additions and 0 deletions
|
|
@ -107,6 +107,8 @@ func listRun(opts *ListOptions) error {
|
|||
|
||||
var repo ghrepo.Interface
|
||||
if opts.BaseRepo != nil {
|
||||
// We swallow this error because when CWD is not a repo and
|
||||
// the --repo flag is not set, we use the global/user session listing.
|
||||
repo, _ = opts.BaseRepo()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue