Skip to content

Commit

Permalink
Merge pull request google#340 from another-rex:fix-cdx-logging
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 705069235
  • Loading branch information
copybara-github committed Dec 11, 2024
2 parents 94e551a + c3a2ce2 commit 28c491a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extractor/filesystem/sbom/cdx/cdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (e Extractor) convertCdxBomToInventory(cdxBom *cyclonedx.BOM, path string)
if cdxPkg.PackageURL != "" {
packageURL, err := purl.FromString(cdxPkg.PackageURL)
if err != nil {
log.Warnf("Invalid PURL for package: %q", cdxPkg.BOMRef)
log.Warnf("Invalid PURL %q for package ref: %q", cdxPkg.PackageURL, cdxPkg.BOMRef)
} else {
m.PURL = &packageURL
if inv.Name == "" {
Expand Down
2 changes: 1 addition & 1 deletion extractor/filesystem/sbom/spdx/spdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (e Extractor) convertSpdxDocToInventory(spdxDoc *spdx.Document, path string
packageURL, err := purl.FromString(extRef.Locator)
inv.Name = packageURL.Name
if err != nil {
log.Warnf("Invalid PURL for package: %q", extRef.Locator)
log.Warnf("Invalid PURL %q for package: %q", extRef.Locator, spdxPkg.PackageName)
} else {
m.PURL = &packageURL
}
Expand Down

0 comments on commit 28c491a

Please sign in to comment.