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.
This commit is contained in:
Kynan Ware 2025-09-02 12:50:15 -06:00
parent 61c8b5ef09
commit 97da7fc1d2

View file

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