forked from toolshed/abra
refactor(recipe): don't use README.md path directly
This commit is contained in:
@ -57,6 +57,7 @@ keys configured on your account.
|
||||
BashComplete: autocomplete.RecipeNameComplete,
|
||||
Action: func(c *cli.Context) error {
|
||||
recipeName := c.Args().First()
|
||||
r := recipe.Get2(recipeName)
|
||||
|
||||
if recipeName != "" {
|
||||
internal.ValidateRecipe(c)
|
||||
@ -103,7 +104,7 @@ keys configured on your account.
|
||||
log.Warn(err)
|
||||
}
|
||||
|
||||
features, category, err := recipe.GetRecipeFeaturesAndCategory(recipeMeta.Name)
|
||||
features, category, err := recipe.GetRecipeFeaturesAndCategory(r)
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
}
|
||||
|
@ -80,11 +80,7 @@ recipe and domain in the sample environment config).
|
||||
|
||||
meta := newRecipeMeta(recipeName)
|
||||
|
||||
toParse := []string{
|
||||
path.Join(config.RECIPES_DIR, recipeName, "README.md"),
|
||||
r.SampleEnvPath,
|
||||
}
|
||||
for _, path := range toParse {
|
||||
for _, path := range []string{r.ReadmePath, r.SampleEnvPath} {
|
||||
tpl, err := template.ParseFiles(path)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
Reference in New Issue
Block a user