Solved bug on error being overwritten and not passed to postAudit, closes #223

This commit is contained in:
Eduardo Argollo committed 2019-05-28 15:35:10 -07:00
1 parent f4b9b6d0b3
commit d6578df998
2 files changed
+11 -10

No files matched your search

+6 -1
View File
@@ -2,14 +2,19 @@ package main
import (
"os"
"strings"
log "github.com/sirupsen/logrus"
"github.com/zricethezav/gitleaks/src"
gitleaks "github.com/zricethezav/gitleaks/src"
)
func main() {
report, err := gitleaks.Run(gitleaks.ParseOpts())
if err != nil {
if strings.Contains(err.Error(), "whitelisted") {
log.Info(err.Error())
os.Exit(0)
}
log.Error(err)
os.Exit(gitleaks.ErrExit)
}