* safer out of bounds

* no color option

* readme
This commit is contained in:
Zachary Rice authored and GitHub committed 2023-03-29 16:56:01 -05:00
1 parent b5a726e96a
commit 63c3076ea2
6 files changed
+19 -5

No files matched your search

+4
View File
@@ -69,6 +69,10 @@ func runProtect(cmd *cobra.Command, args []string) {
if detector.MaxTargetMegaBytes, err = cmd.Flags().GetInt("max-target-megabytes"); err != nil {
log.Fatal().Err(err).Msg("")
}
// set color flag
if detector.NoColor, err = cmd.Flags().GetBool("no-color"); err != nil {
log.Fatal().Err(err).Msg("")
}
if fileExists(filepath.Join(source, ".gitleaksignore")) {
if err = detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore")); err != nil {