fix: bail out on unstage changes for plain --force
continuous-integration/drone/push Build is failing Details

This commit is contained in:
decentral1se 2021-10-26 10:52:26 +02:00
parent b3496ad286
commit d56400eea8
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 9 additions and 0 deletions

View File

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