Skip to content

Commit 7ad2ce7

Browse files
a1012112796Stelios Malathouras
authored and
Stelios Malathouras
committed
not show double error response in git hook (go-gitea#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 <[email protected]>
1 parent 268cfd8 commit 7ad2ce7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/serv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func fail(userMessage, logMessage string, args ...interface{}) error {
9292
if len(logMessage) > 0 {
9393
_ = private.SSHLog(ctx, true, fmt.Sprintf(logMessage+": ", args...))
9494
}
95-
return cli.NewExitError(fmt.Sprintf("Gitea: %s", userMessage), 1)
95+
return cli.NewExitError("", 1)
9696
}
9797

9898
func runServ(c *cli.Context) error {

0 commit comments

Comments
 (0)