mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
[chore] Only set default detectors if none are provided (#3147)
This commit is contained in:
parent
605d037e45
commit
38e844f968
1 changed files with 4 additions and 1 deletions
|
@ -308,7 +308,10 @@ func (e *Engine) setDefaults(ctx context.Context) {
|
|||
e.decoders = decoders.DefaultDecoders()
|
||||
}
|
||||
|
||||
e.detectors = append(e.detectors, DefaultDetectors()...)
|
||||
// Only use the default detectors if none are provided.
|
||||
if len(e.detectors) == 0 {
|
||||
e.detectors = DefaultDetectors()
|
||||
}
|
||||
|
||||
if e.dispatcher == nil {
|
||||
e.dispatcher = NewPrinterDispatcher(new(output.PlainPrinter))
|
||||
|
|
Loading…
Reference in a new issue