mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Handle edge case where it is expected ssh:// urls to have at least one @ symbol (#5851)
* Handle edge case where it is expected ssh:// urls to have at least one @ symbol * add news fragment
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Fix regression with ``ssh://`` vcs URLs introduced in ``2023.8.21`` whereby ssh vcs URLs are expected to have at least one ``@`` symbol.
|
||||
@@ -977,7 +977,9 @@ def install_req_from_pipfile(name, pipfile):
|
||||
if vcs:
|
||||
vcs_url = _pipfile[vcs]
|
||||
fallback_ref = ""
|
||||
if "@" in vcs_url:
|
||||
if ("ssh://" in vcs_url and vcs_url.count("@") >= 2) or (
|
||||
"ssh://" not in vcs_url and "@" in vcs_url
|
||||
):
|
||||
vcs_url_parts = vcs_url.rsplit("@", 1)
|
||||
vcs_url = vcs_url_parts[0]
|
||||
fallback_ref = vcs_url_parts[1]
|
||||
|
||||
@@ -156,7 +156,9 @@ def requirement_from_lockfile(
|
||||
if vcs in package_info:
|
||||
url = package_info[vcs]
|
||||
ref = package_info.get("ref", "")
|
||||
if "@" in url:
|
||||
if ("ssh://" in url and url.count("@") >= 2) or (
|
||||
"ssh://" not in url and "@" in url
|
||||
):
|
||||
url_parts = url.rsplit("@", 1)
|
||||
url = url_parts[0]
|
||||
if not ref:
|
||||
|
||||
Reference in New Issue
Block a user