diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index 073876c0..309d89b9 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -312,8 +312,6 @@ func GetVersionLabelLocal(recipe Recipe) (string, error) { // EnsureUpToDate ensures that the local repo is synced to the remote func EnsureUpToDate(recipeName string) error { - recipeDir := path.Join(config.RECIPES_DIR, recipeName) - isClean, err := gitPkg.IsClean(recipeName) if err != nil { return err @@ -323,6 +321,7 @@ func EnsureUpToDate(recipeName string) error { return fmt.Errorf("%s has locally unstaged changes", recipeName) } + recipeDir := path.Join(config.RECIPES_DIR, recipeName) repo, err := git.PlainOpen(recipeDir) if err != nil { return err