Skip to content

Sub-recipes can't resolve relative paths #3556

@ishii1648

Description

@ishii1648

Describe the bug

Goose can't resolve relative paths for sub-recipes.

To Reproduce

  1. Create a directory structure as follows:
❯ tree
.
├── recipe.yaml
└── sub-recipes
    └── terraform-init.yaml
  1. Create recipe.yaml with relative paths to sub-recipes:
sub_recipes:
  - name: terraform init
    path: "./sub-recipes/terraform-init.yaml"
  1. Attempt to use recipe.yaml.
  2. Goose fails to resolve the relative paths specified for the sub_recipes as follows.
$ goose run --recipe $REPO_PATH/terraform-plan/recipe.yaml
thread 'main' panicked at crates/goose/src/agents/recipe_tools/sub_recipe_tools.rs:13:53:
called `Result::unwrap()` on an `Err` value: Failed to read recipe file sub-recipes/terraform-init.yaml: No such file or directory (os error 2)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior

Goose can resolve relative paths for sub-recipes from main recipe.

Please provide following information:

  • OS & Arch: MacOS arm64
  • Interface: CLI
  • Version: v1.1.3

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions