Skip to content

Commit

Permalink
Check if renderer is nil rather than not nil (#817)
Browse files Browse the repository at this point in the history
Signed-off-by: egibs <[email protected]>
  • Loading branch information
egibs authored Mar 9, 2025
1 parent 1cd56a5 commit 0554ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/action/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func scanSinglePath(ctx context.Context, c malcontent.Config, path string, ruleF
isArchive := archiveRoot != ""
mime := "<unknown>"
kind, err := programkind.File(path)
if err != nil && (c.Renderer != nil || c.Renderer.Name() != interactive) {
if err != nil && (c.Renderer == nil || c.Renderer.Name() != interactive) {
logger.Errorf("file type failure: %s: %s", path, err)
}
if kind != nil {
Expand Down

0 comments on commit 0554ee0

Please sign in to comment.