Some checks failed
continuous-integration/drone/push Build is failing
See #483
17 lines
310 B
Go
17 lines
310 B
Go
package git
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
|
|
"coopcloud.tech/abra/pkg/i18n"
|
|
)
|
|
|
|
// EnsureGitRepo ensures a git repo .git folder exists
|
|
func EnsureGitRepo(repoPath string) error {
|
|
if _, err := os.Stat(repoPath); os.IsNotExist(err) {
|
|
return errors.New(i18n.G("no .git directory in %s?", repoPath))
|
|
}
|
|
return nil
|
|
}
|