fix: better error
This commit is contained in:
parent
49f565e5db
commit
3119220c21
|
@ -23,7 +23,7 @@ func ValidateRecipe(c *cli.Context) recipe.Recipe {
|
||||||
recipeName := c.Args().First()
|
recipeName := c.Args().First()
|
||||||
|
|
||||||
if recipeName == "" {
|
if recipeName == "" {
|
||||||
ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
|
||||||
}
|
}
|
||||||
|
|
||||||
chosenRecipe, err := recipe.Get(recipeName)
|
chosenRecipe, err := recipe.Get(recipeName)
|
||||||
|
@ -91,7 +91,7 @@ func ValidateRecipeWithPrompt(c *cli.Context) recipe.Recipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
if recipeName == "" {
|
if recipeName == "" {
|
||||||
ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
|
||||||
}
|
}
|
||||||
|
|
||||||
chosenRecipe, err := recipe.Get(recipeName)
|
chosenRecipe, err := recipe.Get(recipeName)
|
||||||
|
|
|
@ -50,7 +50,7 @@ recipe and domain in the sample environment config).
|
||||||
recipeName := c.Args().First()
|
recipeName := c.Args().First()
|
||||||
|
|
||||||
if recipeName == "" {
|
if recipeName == "" {
|
||||||
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
|
||||||
}
|
}
|
||||||
|
|
||||||
directory := path.Join(config.RECIPES_DIR, recipeName)
|
directory := path.Join(config.RECIPES_DIR, recipeName)
|
||||||
|
|
Loading…
Reference in New Issue