refactor: more local var
This commit is contained in:
parent
779c810521
commit
17340a79da
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue