diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-11-13 05:27:01 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-11-13 05:27:01 -0500 |
commit | 9e2284048372864a7dbc5e192877ebdca04abcab (patch) | |
tree | 82b98f331ef96b3eff144d4fe48b9504ffd247dc /cmd | |
parent | 8eb5120fbd19dac1221f82d84c339b4be9b0975b (diff) | |
download | gitea-9e2284048372864a7dbc5e192877ebdca04abcab.tar.gz gitea-9e2284048372864a7dbc5e192877ebdca04abcab.zip |
fix #622
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/serve.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/serve.go b/cmd/serve.go index c18bf3ad4b..15d48dcbfe 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -96,7 +96,7 @@ func runServ(k *cli.Context) { println("Gogs: you are not the owner of SSH key") log.GitLogger.Fatal(2, "Invalid owner of SSH key: %d", keyId) } - println("Gogs: internal error:", err) + println("Gogs: internal error:", err.Error()) log.GitLogger.Fatal(2, "Fail to get user by key ID(%d): %v", keyId, err) } @@ -125,7 +125,7 @@ func runServ(k *cli.Context) { println("Gogs: given repository owner are not registered") log.GitLogger.Fatal(2, "Unregistered owner: %s", repoUserName) } - println("Gogs: internal error:", err) + println("Gogs: internal error:", err.Error()) log.GitLogger.Fatal(2, "Fail to get repository owner(%s): %v", repoUserName, err) } @@ -134,7 +134,7 @@ func runServ(k *cli.Context) { case isWrite: has, err := models.HasAccess(user.Name, path.Join(repoUserName, repoName), models.WRITABLE) if err != nil { - println("Gogs: internal error:", err) + println("Gogs: internal error:", err.Error()) log.GitLogger.Fatal(2, "Fail to check write access:", err) } else if !has { println("You have no right to write this repository") @@ -147,7 +147,7 @@ func runServ(k *cli.Context) { println("Gogs: given repository does not exist") log.GitLogger.Fatal(2, "Repository does not exist: %s/%s", repoUser.Name, repoName) } - println("Gogs: internal error:", err) + println("Gogs: internal error:", err.Error()) log.GitLogger.Fatal(2, "Fail to get repository: %v", err) } @@ -157,7 +157,7 @@ func runServ(k *cli.Context) { has, err := models.HasAccess(user.Name, path.Join(repoUserName, repoName), models.READABLE) if err != nil { - println("Gogs: internal error:", err) + println("Gogs: internal error:", err.Error()) log.GitLogger.Fatal(2, "Fail to check read access:", err) } else if !has { println("You have no right to access this repository") |