Implicitly set the headless flag if template validation was requested, in order to correctly validate headless templates instead of complaining about "cannot create template executer"

This commit is contained in:
forgedhallpass 2021-09-30 19:07:59 +03:00
parent 8a8d61996f
commit d10dfb550e
2 changed files with 2 additions and 1 deletions

View File

@ -95,6 +95,7 @@ func validateOptions(options *types.Options) error {
}
if options.Validate {
options.Headless = true // required for correct validation of headless templates
validateTemplatePaths(options.TemplatesDirectory, options.Templates, options.Workflows)
}

View File

@ -103,7 +103,7 @@ type Options struct {
Headless bool
// ShowBrowser specifies whether the show the browser in headless mode
ShowBrowser bool
// SytemResolvers enables override of nuclei's DNS client opting to use system resolver stack.
// SystemResolvers enables override of nuclei's DNS client opting to use system resolver stack.
SystemResolvers bool
// Metrics enables display of metrics via an http endpoint
Metrics bool