diff --git a/routers/install.go b/routers/install.go index b9e8bb29078..5d6c65ef9be 100644 --- a/routers/install.go +++ b/routers/install.go @@ -7,6 +7,7 @@ package routers import ( "errors" "os" + "os/exec" "strings" "github.com/Unknwon/goconfig" @@ -103,6 +104,11 @@ func Install(ctx *middleware.Context, form auth.InstallForm) { return } + if _, err := exec.LookPath("git"); err != nil { + ctx.RenderWithErr("Fail to test 'git' command: "+err.Error(), "install", &form) + return + } + // Pass basic check, now test configuration. // Test database setting. dbTypes := map[string]string{"mysql": "mysql", "pgsql": "postgres", "sqlite": "sqlite3"} diff --git a/routers/user/social.go b/routers/user/social.go index 7b4d232987f..a35da549311 100644 --- a/routers/user/social.go +++ b/routers/user/social.go @@ -110,7 +110,7 @@ func SocialSignIn(ctx *middleware.Context, tokens oauth2.Tokens) { case models.ErrOauth2NotAssociatedWithUser: // pass default: - log.Error(err) // FIXME: handle error page + log.Error(err.Error()) // FIXME: handle error page return } ctx.Session.Set("socialId", oa.Id) diff --git a/templates/install.tmpl b/templates/install.tmpl index 1fbc74bc7d6..c70cfa3e6bb 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -156,11 +156,11 @@
- +
- +