From 227f0bd01d7ca712f2bccb8644a6dd930d7376b3 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:55:03 -0600 Subject: [PATCH] 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. --- pkg/cmd/agent-task/list/list.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cmd/agent-task/list/list.go b/pkg/cmd/agent-task/list/list.go index 6add74df8..437767fe5 100644 --- a/pkg/cmd/agent-task/list/list.go +++ b/pkg/cmd/agent-task/list/list.go @@ -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() }