big refactor
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
2024-06-24 23:20:54 +02:00
parent b688ddc4b1
commit cbab9b5907
27 changed files with 411 additions and 324 deletions

View File

@ -57,7 +57,10 @@ func ValidateRecipe(c *cli.Context) recipe.Recipe {
ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
}
chosenRecipe, err := recipe.Get(recipeName, Offline)
r, err := recipe.Get(recipeName)
if err != nil {
logrus.Fatal(err)
}
if err != nil {
if c.Command.Name == "generate" {
if strings.Contains(err.Error(), "missing a compose") {
@ -74,7 +77,7 @@ func ValidateRecipe(c *cli.Context) recipe.Recipe {
logrus.Debugf("validated %s as recipe argument", recipeName)
return chosenRecipe
return r
}
// ValidateApp ensures the app name arg is valid.