summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/repo.go6
-rw-r--r--models/user.go2
2 files changed, 7 insertions, 1 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 {
diff --git a/models/user.go b/models/user.go
index 540f4b6af4..ca772556b7 100644
--- a/models/user.go
+++ b/models/user.go
@@ -81,7 +81,7 @@ type User struct {
// DashboardLink returns the user dashboard page link.
func (u *User) DashboardLink() string {
if u.IsOrganization() {
- return "/org/" + u.Name + "/dashboard"
+ return "/org/" + u.Name + "/dashboard/"
}
return "/"
}