Skip to content

Commit d6b4526

Browse files
authored
Fix error check breaking stats (#892)
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent 5310dc2 commit d6b4526

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/action/scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ func Scan(ctx context.Context, c malcontent.Config) (*malcontent.Report, error)
756756
}
757757
return true
758758
})
759-
if scanCtx.Err() != nil && c.Stats && c.Renderer.Name() != "JSON" && c.Renderer.Name() != "YAML" {
759+
if scanCtx.Err() == nil && c.Stats && c.Renderer.Name() != "JSON" && c.Renderer.Name() != "YAML" {
760760
err = render.Statistics(&c, r)
761761
if err != nil {
762762
return r, fmt.Errorf("stats: %w", err)

0 commit comments

Comments
 (0)