Files
abra/pkg/git/common.go
decentral1se ff32c06676
All checks were successful
continuous-integration/drone/push Build is passing
feat: translation support
See #483
2025-08-19 16:07:24 +02:00

17 lines
319 B
Go

package git
import (
"errors"
"os"
"github.com/leonelquinteros/gotext"
)
// EnsureGitRepo ensures a git repo .git folder exists
func EnsureGitRepo(repoPath string) error {
if _, err := os.Stat(repoPath); os.IsNotExist(err) {
return errors.New(gotext.Get("no .git directory in %s?", repoPath))
}
return nil
}