Skip to content

goose recipe list can return duplicated entries #5293

@benoitf

Description

@benoitf

Describe the bug

duplicated entries using goose recipe list depending on env var or directories

To Reproduce
Steps to reproduce the behavior:

  1. provide as env var the default recipe storage

GOOSE_RECIPE_PATH="$HOME/.config/goose/recipes" goose recipe list --format json

GOOSE_RECIPE_PATH="$HOME/.config/goose/recipes" goose recipe list --format json | jq .                                                                                               
[
  {
    "name": "my-task",
    "source": "Local",
    "path": "$HOME/.config/goose/recipes/my-task.yaml",
    "title": "my-task,
    "description": "my-task"
  },
  {
    "name": "my-task",
    "source": "Local",
    "path": $HOME/.config/goose/recipes/my-task.yaml",
    "title": "my-task,
    "description": "my-task"
  },
]

or if you go to the $HOME/.config/goose folder and try the env variable or not, you may have up to 3 duplicates. As it'll list from current folder, default folder and env variable folder.

IMHO It should filter out duplicated locations

Screenshots
If applicable, add screenshots to help explain your problem.

Please provide following information:

  • OS & Arch: macOS latest
  • Interface: [CLI]
  • Version: 1.11.1
  • Extensions enabled: none
  • Provider & Model: none

Additional context
was working in v1.9.3, fails in v1.10 and v1.11

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions