From 5da4afa0ecaffd03d4562b39c62186b65df520a8 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Fri, 18 Feb 2022 09:55:07 +0100 Subject: [PATCH] fix: only ensure latest after cloning --- cli/internal/validate.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/internal/validate.go b/cli/internal/validate.go index 432234bf..025829a8 100644 --- a/cli/internal/validate.go +++ b/cli/internal/validate.go @@ -26,12 +26,6 @@ func ValidateRecipe(c *cli.Context, ensureLatest bool) recipe.Recipe { 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) if err != nil { 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) return chosenRecipe