mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
define log-opts, odd that this wasn't failing before... (#1009)
This commit is contained in:
1 parent
c0caab0355
commit
586b4e2a2e
1 file changed
+5
@@ -16,6 +16,7 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
protectCmd.Flags().Bool("staged", false, "detect secrets in a --staged state")
|
protectCmd.Flags().Bool("staged", false, "detect secrets in a --staged state")
|
||||||
|
protectCmd.Flags().String("log-opts", "", "git log options")
|
||||||
rootCmd.AddCommand(protectCmd)
|
rootCmd.AddCommand(protectCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,6 +67,10 @@ func runProtect(cmd *cobra.Command, args []string) {
|
|||||||
log.Fatal().Err(err).Msg("")
|
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
|
// get log options for git scan
|
||||||
logOpts, err := cmd.Flags().GetString("log-opts")
|
logOpts, err := cmd.Flags().GetString("log-opts")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user