1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

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>
This commit is contained in:
a1012112796 2022-01-16 17:32:32 +08:00 committed by GitHub
parent 7960c96c19
commit 72b3681648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {