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:
Kynan Ware 2025-09-02 12:55:03 -06:00
parent 4a07cdf940
commit 227f0bd01d

View file

@ -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()
}