Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Feb 13, 2025
1 parent 2a4241a commit 7da275b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/helpers/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const validateRefs = (bomJson) => {
}
let parentPurlType;
try {
const purlObj = PackageURL.fromString(encodeURIComponent(dep.ref));
const purlObj = PackageURL.fromString(dep.ref);
parentPurlType = purlObj.type;
} catch (e) {
// pass
Expand All @@ -257,7 +257,7 @@ export const validateRefs = (bomJson) => {
}
let childPurlType;
try {
const purlObj = PackageURL.fromString(encodeURIComponent(don));
const purlObj = PackageURL.fromString(don);
childPurlType = purlObj.type;
} catch (e) {
// pass
Expand All @@ -268,7 +268,7 @@ export const validateRefs = (bomJson) => {
parentPurlType !== childPurlType
) {
warningsList.push(
`Parent with type '${parentPurlType}' has a dependency on child with a different type '${childPurlType}'. Possible bug in cdxgen.`,
`The parent package '${dep.ref}' (type ${parentPurlType}) depends on the child package '${don}' (type ${childPurlType}). This is a bug in cdxgen if this project is not a monorepo.`,
);
}
}
Expand Down

0 comments on commit 7da275b

Please sign in to comment.