Skip to content

Commit

Permalink
fix: handle empty package supplier name in SPDX
Browse files Browse the repository at this point in the history
Closes #92.
  • Loading branch information
mcombuechen committed Dec 11, 2024
1 parent b0523a0 commit 2feb3a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ecosystems/enrich_spdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func enrichSPDXSupplier(pkg *v2_3.Package, data *packages.Package) {
if data.RepoMetadata != nil {
meta := *data.RepoMetadata
if ownerRecord, ok := meta["owner_record"].(map[string]interface{}); ok {
if name, ok := ownerRecord["name"].(string); ok {
if name, ok := ownerRecord["name"].(string); ok && name != "" {
pkg.PackageSupplier = &common.Supplier{
SupplierType: "Organization",
Supplier: name,
Expand Down

0 comments on commit 2feb3a1

Please sign in to comment.