fix: dont checkout latest if we dont have a copy
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2022-02-09 09:54:02 +01:00
parent 0a208d049e
commit 2b2dcc01b4
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 5 additions and 5 deletions

View File

@ -100,17 +100,17 @@ func ValidateRecipeWithPrompt(c *cli.Context, ensureLatest bool) recipe.Recipe {
ShowSubcommandHelpAndError(c, errors.New("no recipe name provided"))
}
chosenRecipe, err := recipe.Get(recipeName)
if err != nil {
logrus.Fatal(err)
}
if ensureLatest {
if err := recipe.EnsureLatest(recipeName); err != nil {
logrus.Fatal(err)
}
}
chosenRecipe, err := recipe.Get(recipeName)
if err != nil {
logrus.Fatal(err)
}
logrus.Debugf("validated %s as recipe argument", recipeName)
return chosenRecipe