summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2022-01-16 17:32:32 +0800
committerGitHub <noreply@github.com>2022-01-16 09:32:32 +0000
commit72b36816481a6af1cf3fc1bc4e27b96b8a2779ef (patch)
treee97c1208222150830bf6e8b0e64a88f29c7ca737
parent7960c96c19bf56679e817f48a18f2ef449f5c551 (diff)
downloadgitea-72b36816481a6af1cf3fc1bc4e27b96b8a2779ef.tar.gz
gitea-72b36816481a6af1cf3fc1bc4e27b96b8a2779ef.zip
not show double error response in git hook (#18292)
if return a error message to cli, it will print it to stderr which is duplicate with our code (line 82 in same file). so user will see two line same error message in git output. I think it's not mecessary, so suggerst not return error message to cli. Thanks. Signed-off-by: a1012112796 <1012112796@qq.com>
-rw-r--r--cmd/serv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/serv.go b/cmd/serv.go
index 334f7b52b9..ab60358b53 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -92,7 +92,7 @@ func fail(userMessage, logMessage string, args ...interface{}) error {
if len(logMessage) > 0 {
_ = private.SSHLog(ctx, true, fmt.Sprintf(logMessage+": ", args...))
}
- return cli.NewExitError(fmt.Sprintf("Gitea: %s", userMessage), 1)
+ return cli.NewExitError("", 1)
}
func runServ(c *cli.Context) error {