diff --git a/v2/internal/runner/templates.go b/v2/internal/runner/templates.go index c585ba39..ac1c5b14 100644 --- a/v2/internal/runner/templates.go +++ b/v2/internal/runner/templates.go @@ -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++ } diff --git a/v2/pkg/templates/compile.go b/v2/pkg/templates/compile.go index 21d50ffd..6b2630e7 100644 --- a/v2/pkg/templates/compile.go +++ b/v2/pkg/templates/compile.go @@ -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