refactor(recipe): remove Dir method on old struct
This commit is contained in:
parent
eb62e0ecc3
commit
ca1db33e97
@ -110,14 +110,14 @@ your SSH keys configured on your account.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isClean, err := gitPkg.IsClean(recipe.Dir())
|
isClean, err := gitPkg.IsClean(r.Dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isClean {
|
if !isClean {
|
||||||
log.Infof("%s currently has these unstaged changes 👇", recipe.Name)
|
log.Infof("%s currently has these unstaged changes 👇", recipe.Name)
|
||||||
if err := gitPkg.DiffUnstaged(recipe.Dir()); err != nil {
|
if err := gitPkg.DiffUnstaged(r.Dir); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -201,13 +201,13 @@ likely to change.
|
|||||||
log.Infof("dry run: not syncing label %s for recipe %s", nextTag, recipe.Name)
|
log.Infof("dry run: not syncing label %s for recipe %s", nextTag, recipe.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
isClean, err := gitPkg.IsClean(recipe.Dir())
|
isClean, err := gitPkg.IsClean(r.Dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if !isClean {
|
if !isClean {
|
||||||
log.Infof("%s currently has these unstaged changes 👇", recipe.Name)
|
log.Infof("%s currently has these unstaged changes 👇", recipe.Name)
|
||||||
if err := gitPkg.DiffUnstaged(recipe.Dir()); err != nil {
|
if err := gitPkg.DiffUnstaged(r.Dir); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,11 +136,6 @@ type Recipe struct {
|
|||||||
Meta RecipeMeta
|
Meta RecipeMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dir retrieves the recipe repository path
|
|
||||||
func (r Recipe) Dir() string {
|
|
||||||
return path.Join(config.RECIPES_DIR, r.Name)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves a recipe.
|
// Get retrieves a recipe.
|
||||||
func Get(recipeName string, offline bool) (Recipe, error) {
|
func Get(recipeName string, offline bool) (Recipe, error) {
|
||||||
r := Get2(recipeName)
|
r := Get2(recipeName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user