diff --git a/cli/internal/validate.go b/cli/internal/validate.go index 1823d72d..7c5896ae 100644 --- a/cli/internal/validate.go +++ b/cli/internal/validate.go @@ -27,7 +27,11 @@ func ValidateRecipe(c *cli.Context) recipe.Recipe { recipe, err := recipe.Get(recipeName) if err != nil { - logrus.Fatal(err) + if c.Command.Name == "generate" { + logrus.Warn(err) + } else { + logrus.Fatal(err) + } } logrus.Debugf("validated '%s' as recipe argument", recipeName) diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index f6edf7ee..c17317ca 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -84,7 +84,7 @@ func Get(recipeName string) (Recipe, error) { envSamplePath := path.Join(config.ABRA_DIR, "apps", recipeName, ".env.sample") sampleEnv, err := config.ReadEnv(envSamplePath) if err != nil { - logrus.Fatal(err) + return Recipe{}, err } opts := stack.Deploy{Composefiles: composeFiles}