forked from coop-cloud/abra
fix: bail out on unstage changes for plain --force
This commit is contained in:
parent
b3496ad286
commit
d56400eea8
|
@ -169,6 +169,15 @@ func EnsureVersion(recipeName, version string) error {
|
|||
func EnsureLatest(recipeName string) error {
|
||||
recipeDir := path.Join(config.ABRA_DIR, "apps", recipeName)
|
||||
|
||||
isClean, err := gitPkg.IsClean(recipeName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !isClean {
|
||||
return fmt.Errorf("'%s' has locally unstaged changes", recipeName)
|
||||
}
|
||||
|
||||
logrus.Debugf("attempting to open git repository in '%s'", recipeDir)
|
||||
|
||||
repo, err := git.PlainOpen(recipeDir)
|
||||
|
|
Loading…
Reference in New Issue