fix: only ensure latest after cloning
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9d5e805748
commit
5da4afa0ec
|
@ -26,12 +26,6 @@ func ValidateRecipe(c *cli.Context, ensureLatest bool) recipe.Recipe {
|
||||||
ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
|
ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ensureLatest {
|
|
||||||
if err := recipe.EnsureLatest(recipeName); err != nil {
|
|
||||||
logrus.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
chosenRecipe, err := recipe.Get(recipeName)
|
chosenRecipe, err := recipe.Get(recipeName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if c.Command.Name == "generate" {
|
if c.Command.Name == "generate" {
|
||||||
|
@ -44,6 +38,12 @@ func ValidateRecipe(c *cli.Context, ensureLatest bool) recipe.Recipe {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ensureLatest {
|
||||||
|
if err := recipe.EnsureLatest(recipeName); err != nil {
|
||||||
|
logrus.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logrus.Debugf("validated %s as recipe argument", recipeName)
|
logrus.Debugf("validated %s as recipe argument", recipeName)
|
||||||
|
|
||||||
return chosenRecipe
|
return chosenRecipe
|
||||||
|
|
Loading…
Reference in New Issue