forked from toolshed/abra
refactor(recipe): remove direct usage of config.RECIPE_DIR
This commit is contained in:
@ -132,6 +132,7 @@ func Get(name string) Recipe {
|
||||
ComposePath: path.Join(dir, "compose.yml"),
|
||||
ReadmePath: path.Join(dir, "README.md"),
|
||||
SampleEnvPath: path.Join(dir, ".env.sample"),
|
||||
AbraShPath: path.Join(dir, "abra.sh"),
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,6 +144,7 @@ type Recipe struct {
|
||||
ComposePath string
|
||||
ReadmePath string
|
||||
SampleEnvPath string
|
||||
AbraShPath string
|
||||
}
|
||||
|
||||
// GetRecipesLocal retrieves all local recipe directories
|
||||
@ -581,8 +583,7 @@ func UpdateRepositories(repos RepoCatalogue, recipeName string) error {
|
||||
return
|
||||
}
|
||||
|
||||
recipeDir := path.Join(config.RECIPES_DIR, rm.Name)
|
||||
if err := gitPkg.Clone(recipeDir, rm.CloneURL); err != nil {
|
||||
if err := gitPkg.Clone(Get(rm.Name).Dir, rm.CloneURL); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user