Skip to content

Commit d124cd5

Browse files
authored
Merge pull request #1537 from luhring/panic-at-the-nil-sbom
fix(scan): avoid panic by handling err from SBOM gen
2 parents 914dfbd + 63492e7 commit d124cd5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/cli/scan.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,10 @@ func scanEverything(ctx context.Context, p *scanParams, inputs []string, advisor
270270
if err := errs[i]; err != nil {
271271
if p.outputFormat == outputFormatOutline {
272272
fmt.Printf("❌ Skipping scan because SBOM generation failed for %q: %v\n", input, err)
273-
continue
274273
}
274+
275+
// All errs will get joined and returned at the end of the outer function.
276+
continue
275277
}
276278

277279
file := files[i]

0 commit comments

Comments
 (0)