define log-opts, odd that this wasn't failing before... (#1009)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-10-11 07:11:02 -05:00
1 parent c0caab0355
commit 586b4e2a2e
1 file changed
+5
+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 {