diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-08 15:27:35 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-08 15:27:35 -0400 |
commit | a991ebf5d0fe06c97be4b90b562e058ea2642de9 (patch) | |
tree | cd4a1710023de2cf1660b3333725c6ee8c61f8eb | |
parent | b5064298036c25b492c9b4547ed5314f928ceaeb (diff) | |
download | gitea-a991ebf5d0fe06c97be4b90b562e058ea2642de9.tar.gz gitea-a991ebf5d0fe06c97be4b90b562e058ea2642de9.zip |
Fix #54
-rw-r--r-- | routers/install.go | 6 | ||||
-rw-r--r-- | routers/user/social.go | 2 | ||||
-rw-r--r-- | templates/install.tmpl | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/routers/install.go b/routers/install.go index b9e8bb2907..5d6c65ef9b 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 7b4d232987..a35da54931 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 1fbc74bc7d..c70cfa3e6b 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -156,11 +156,11 @@ <label class="col-md-3 control-label">SMTP Host: </label> <div class="col-md-8"> - <input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address" value="{{.smtp_host}}"> + <input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address and port" value="{{.smtp_host}}"> </div> </div> <div class="form-group"> - <label class="col-md-3 control-label">Email: </label> + <label class="col-md-3 control-label">Username: </label> <div class="col-md-8"> <input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address" value="{{.mailer_user}}"> |