From 97da7fc1d230f50e10f419df19faf6906be3670f Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:50:15 -0600 Subject: [PATCH] Simplify BaseRepo assignment in list command Removes unnecessary nil check for Factory before assigning BaseRepo in the agent-task list command. This streamlines the code since Factory is always expected to be non-nil. --- pkg/cmd/agent-task/list/list.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/agent-task/list/list.go b/pkg/cmd/agent-task/list/list.go index 5b5ff0c38..6add74df8 100644 --- a/pkg/cmd/agent-task/list/list.go +++ b/pkg/cmd/agent-task/list/list.go @@ -46,9 +46,9 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { // Support -R/--repo override - if f != nil { - opts.BaseRepo = f.BaseRepo - } + + opts.BaseRepo = f.BaseRepo + if opts.Limit < 1 { return cmdutil.FlagErrorf("invalid limit: %v", opts.Limit) }