fix: ensure logging for status checks

Closes coop-cloud/organising#226.
This commit is contained in:
decentral1se 2021-11-02 15:15:52 +01:00
parent 9b704b002b
commit 7f176d8e2f
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import (
"coopcloud.tech/abra/pkg/config"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/sirupsen/logrus"
)
// GetRecipeHead retrieves latest HEAD metadata.
@ -44,5 +45,11 @@ func IsClean(recipeName string) (bool, error) {
return false, err
}
if status.String() != "" {
logrus.Debugf("discovered git status for %s repository: %s", recipeName, status.String())
} else {
logrus.Debugf("discovered clean git status for %s repository", recipeName)
}
return status.IsClean(), nil
}