refactor(recipe): introduce Dir var

This commit is contained in:
p4u1 2024-07-07 12:54:50 +02:00
parent 01f3f4be17
commit 4cf6155fb8

View File

@ -267,11 +267,15 @@ func (r Recipe) SampleEnv() (map[string]string, error) {
} }
func Get2(name string) Recipe2 { func Get2(name string) Recipe2 {
return Recipe2{Name: name} return Recipe2{
Name: name,
Dir: path.Join(config.RECIPES_DIR, name),
}
} }
type Recipe2 struct { type Recipe2 struct {
Name string Name string
Dir string
} }
// Ensure makes sure the recipe exists, is up to date and has the latest version checked out. // Ensure makes sure the recipe exists, is up to date and has the latest version checked out.