Skip to content

Commit fc9213f

Browse files
committed
disable gitleaks logger
1 parent 313c139 commit fc9213f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

routers/private/hook_pre_receive.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ import (
2828
pull_service "code.gitea.io/gitea/services/pull"
2929

3030
"github.com/gitleaks/go-gitdiff/gitdiff"
31+
"github.com/rs/zerolog"
3132
"github.com/zricethezav/gitleaks/v8/cmd/scm"
3233
gitleaks "github.com/zricethezav/gitleaks/v8/detect"
34+
gitleaks_log "github.com/zricethezav/gitleaks/v8/logging"
3335
)
3436

3537
type preReceiveContext struct {
@@ -634,3 +636,7 @@ func (g *giteacmd) ErrCh() <-chan error {
634636
func (g *giteacmd) Wait() (err error) {
635637
return nil
636638
}
639+
640+
func init() {
641+
gitleaks_log.Logger = zerolog.Nop()
642+
}

0 commit comments

Comments
 (0)