Misc changes

dev
Ice3man543 2021-02-22 13:04:42 +05:30
parent 1a3fea64f2
commit dfa21c1896
2 changed files with 4 additions and 1 deletions

View File

@ -27,6 +27,9 @@ func (r *Runner) getParsedTemplatesFor(templatePaths []string, severities []stri
gologger.Warning().Msgf("Could not parse file '%s': %s\n", match, err)
continue
}
if len(t.Workflows) == 0 && r.options.Workflows {
continue // don't print if user only wants to run workflows
}
if len(t.Workflows) > 0 {
workflowCount++
}

View File

@ -122,7 +122,7 @@ func Parse(filePath string, options protocols.ExecuterOptions) (*Template, error
}
template.TotalRequests += template.Executer.Requests()
}
if template.Executer == nil {
if template.Executer == nil && template.CompiledWorkflow == nil {
return nil, errors.New("cannot create template executer")
}
return template, nil