From 5bcd5948b0d3479fe41842634e0ad522cbd790ee Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Sun, 16 Jan 2022 10:18:37 +0800 Subject: [PATCH] not show double error response in git hook 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> --- cmd/serv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/serv.go b/cmd/serv.go index 334f7b52b9df4..ab60358b53e0b 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 {