mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 04:45:27 +00:00
Avoid adding empty array, ensure warning is shown to the user.
This commit is contained in:
parent
29cd509809
commit
0833e21a17
@ -171,13 +171,14 @@ func (r *Runner) RunEnumeration() {
|
||||
|
||||
// directory couldn't be walked
|
||||
if err != nil {
|
||||
gologger.Warningf("Could not find templates in directory '%s': %s\n", absPath, err)
|
||||
gologger.Labelf("Could not find templates in directory '%s': %s\n", absPath, err)
|
||||
continue
|
||||
}
|
||||
|
||||
// couldn't find templates in directory
|
||||
if len(matches) == 0 {
|
||||
gologger.Warningf("Error, no templates were found in '%s'.\n", absPath)
|
||||
gologger.Labelf("Error, no templates were found in '%s'.\n", absPath)
|
||||
continue
|
||||
}
|
||||
|
||||
allTemplates = append(allTemplates, matches...)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user