Compare commits

...
1 Commits
+5
View File
@@ -16,6 +16,7 @@ import (
func init() {
protectCmd.Flags().Bool("staged", false, "detect secrets in a --staged state")
protectCmd.Flags().String("log-opts", "", "git log options")
rootCmd.AddCommand(protectCmd)
}
@@ -66,6 +67,10 @@ func runProtect(cmd *cobra.Command, args []string) {
log.Fatal().Err(err).Msg("")
}
if detector.MaxTargetMegaBytes, err = cmd.Flags().GetInt("max-target-megabytes"); err != nil {
log.Fatal().Err(err).Msg("")
}
// get log options for git scan
logOpts, err := cmd.Flags().GetString("log-opts")
if err != nil {