fix: warn on invalid envs for catalogue generation
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

Closes coop-cloud/organising#256.
This commit is contained in:
decentral1se 2021-11-22 18:38:59 +01:00
parent cb32e88cde
commit 711c4e5ee8
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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}