Update src/apm_cli/models/apm_package.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Daniel Meppiel
2025-09-16 13:59:41 +02:00
committed by GitHub
parent 93bf878908
commit 794515d242

View File

@@ -125,8 +125,8 @@ class DependencyReference:
# For any other format, try both github.com/ prefix and user/repo formats
# Let urllib.parse handle the validation instead of unsafe string operations
candidate_urls = [
f"https://{repo_url}", # Handles github.com/user/repo format
f"https://github.com/{repo_url}" # Handles user/repo format
urllib.parse.urljoin("https://", repo_url), # Handles github.com/user/repo format
urllib.parse.urljoin("https://github.com/", repo_url) # Handles user/repo format
]
parsed_url = None