From e9125f8fca560b0aa65c7e7ab45b712751bb0b3e Mon Sep 17 00:00:00 2001 From: mzack Date: Mon, 21 Mar 2022 11:33:10 +0100 Subject: [PATCH] Fix for nil unexpected return value in workflow execution --- v2/internal/runner/runner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/internal/runner/runner.go b/v2/internal/runner/runner.go index 8025366b..bf7faa57 100644 --- a/v2/internal/runner/runner.go +++ b/v2/internal/runner/runner.go @@ -357,6 +357,7 @@ func (r *Runner) RunEnumeration() error { if r.issuesClient != nil { r.issuesClient.Close() } + if !results.Load() { gologger.Info().Msgf("No results found. Better luck next time!") } @@ -425,7 +426,7 @@ func (r *Runner) executeTemplatesInput(store *loader.Store, engine *core.Engine) // 0 matches means no templates were found in directory if templateCount == 0 { - return nil, errors.New("no valid templates were found") + return &atomic.Bool{}, errors.New("no valid templates were found") } // tracks global progress and captures stdout/stderr until p.Wait finishes