forked from toolshed/abra
refactor(recipe): use method or variable for .env.sample
This commit is contained in:
@ -12,6 +12,7 @@ import (
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/git"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"coopcloud.tech/abra/pkg/recipe"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@ -55,6 +56,7 @@ recipe and domain in the sample environment config).
|
||||
`,
|
||||
Action: func(c *cli.Context) error {
|
||||
recipeName := c.Args().First()
|
||||
r := recipe.Get2(recipeName)
|
||||
|
||||
if recipeName == "" {
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
|
||||
@ -80,7 +82,7 @@ recipe and domain in the sample environment config).
|
||||
|
||||
toParse := []string{
|
||||
path.Join(config.RECIPES_DIR, recipeName, "README.md"),
|
||||
path.Join(config.RECIPES_DIR, recipeName, ".env.sample"),
|
||||
r.SampleEnvPath,
|
||||
}
|
||||
for _, path := range toParse {
|
||||
tpl, err := template.ParseFiles(path)
|
||||
|
Reference in New Issue
Block a user