Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/spdx/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,13 +750,16 @@ func parseTagValue(file *os.File) (doc *Document, err error) {
if p, ok := objects[rdata.Peer].(*Package); ok {
logrus.Debugf("doc %s describes package %s", doc.ID, rdata.Peer)
doc.Packages[rdata.Peer] = p
continue
}

if f, ok := objects[rdata.Peer].(*File); ok {
logrus.Debugf("doc %s describes file %s", doc.ID, rdata.Peer)
doc.Files[(objects[rdata.Peer]).(*File).SPDXID()] = f //nolint: errcheck
continue
}
continue

return nil, fmt.Errorf("unable to find peer object with SPDXID %s", rdata.Peer)
}

// Check if the source object is defined
Expand Down