All checks were successful
continuous-integration/drone/push Build is passing
See #483
17 lines
319 B
Go
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
|
|
}
|