refactor: more local var

This commit is contained in:
decentral1se 2021-12-26 00:14:48 +01:00
parent 779c810521
commit 17340a79da
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 1 additions and 2 deletions

View File

@ -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