Skip to content

Commit

Permalink
🧹 Prevent panic for unsupported operating systems
Browse files Browse the repository at this point in the history
Follow-up to #4008

Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker committed May 21, 2024
1 parent ff2ea75 commit 9c766e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sbom/sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ func GenerateBom(r *reporter.Report) ([]*Sbom, error) {

// extract os packages and python packages
dataPoints := r.Data[mrn]
if dataPoints == nil {
bom.Status = Status_STATUS_FAILED
bom.ErrorMessage = "no data points found"
boms = append(boms, bom)
continue
}
for k := range dataPoints.Values {
dataValue := dataPoints.Values[k]
jsondata, err := reporter.JsonValue(dataValue.Content)
Expand Down

0 comments on commit 9c766e2

Please sign in to comment.