summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index da0813e3b4..1e899c182b 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -11,6 +11,7 @@ import (
"html/template"
"io/ioutil"
"os"
+ "os/exec"
"path"
"path/filepath"
"regexp"
@@ -84,6 +85,11 @@ func LoadRepoConfig() {
func NewRepoContext() {
zip.Verbose = false
+ // Check Git installation.
+ if _, err := exec.LookPath("git"); err != nil {
+ log.Fatal(4, "Fail to test 'git' command: %v (forgotten install?)", err)
+ }
+
// Check Git version.
ver, err := git.GetVersion()
if err != nil {