Skip to content

Commit 58b3c0b

Browse files
committed
Add version handling for composer
Signed-off-by: Tushar Goel <[email protected]>
1 parent db8a4fe commit 58b3c0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/fetchcode/composer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ def get_download_url(cls, purl):
4747
return
4848

4949
for package in data["packages"][name]:
50-
if package["version"] == purl.version:
50+
if (
51+
package.get("version") == purl.version
52+
or package.get("version") == f"v{purl.version}"
53+
or package.get("version_normalized") == purl.version
54+
or package.get("version_normalized") == f"v{purl.version}"
55+
):
5156
download_url = package["dist"].get("url")
5257
return download_url

0 commit comments

Comments
 (0)