Skip to content

Commit

Permalink
solver: skip sbom post processor if result is nil
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 7ca2cd9)
  • Loading branch information
jedevc authored and tonistiigi committed Apr 20, 2023
1 parent 11a0070 commit 7ddae62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions solver/llbsolver/proc/sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func SBOMProcessor(scannerRef string, useCache bool) llbsolver.Processor {
if !ok {
return nil, errors.Errorf("could not find ref %s", p.ID)
}
if ref == nil {
continue
}

defop, err := llb.NewDefinitionOp(ref.Definition())
if err != nil {
return nil, err
Expand Down

0 comments on commit 7ddae62

Please sign in to comment.