mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Fixed cloning a package (library) from a private Git repository with custom user name and SSH port // Resolve #925
This commit is contained in:
@ -50,6 +50,9 @@ PlatformIO 3.0
|
|||||||
* Fixed issue when `Library Dependency Finder (LDF) <http://docs.platformio.org/page/librarymanager/ldf.html>`__
|
* Fixed issue when `Library Dependency Finder (LDF) <http://docs.platformio.org/page/librarymanager/ldf.html>`__
|
||||||
does not handle custom ``src_dir``
|
does not handle custom ``src_dir``
|
||||||
(`issue #942 <https://github.com/platformio/platformio-core/issues/942>`_)
|
(`issue #942 <https://github.com/platformio/platformio-core/issues/942>`_)
|
||||||
|
* Fixed cloning a package (library) from a private Git repository with
|
||||||
|
custom user name and SSH port
|
||||||
|
(`issue #925 <https://github.com/platformio/platformio-core/issues/925>`_)
|
||||||
|
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -503,10 +503,10 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin):
|
|||||||
url_marker = "://"
|
url_marker = "://"
|
||||||
|
|
||||||
req_conditions = [
|
req_conditions = [
|
||||||
not requirements, "@" in text,
|
not requirements,
|
||||||
(url_marker != "git@" and "://git@" not in text) or
|
"@" in text,
|
||||||
text.count("@") > 1
|
not url_marker.startswith("git")
|
||||||
]
|
] # yapf: disable
|
||||||
if all(req_conditions):
|
if all(req_conditions):
|
||||||
text, requirements = text.rsplit("@", 1)
|
text, requirements = text.rsplit("@", 1)
|
||||||
if text.isdigit():
|
if text.isdigit():
|
||||||
|
@ -127,6 +127,11 @@ def test_pkg_input_parser():
|
|||||||
"git+ssh://git@gitlab.private-server.com/user/package#1.2.0",
|
"git+ssh://git@gitlab.private-server.com/user/package#1.2.0",
|
||||||
("package", None,
|
("package", None,
|
||||||
"git+ssh://git@gitlab.private-server.com/user/package#1.2.0")
|
"git+ssh://git@gitlab.private-server.com/user/package#1.2.0")
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"git+ssh://user@gitlab.private-server.com:1234/package#1.2.0",
|
||||||
|
("package", None,
|
||||||
|
"git+ssh://user@gitlab.private-server.com:1234/package#1.2.0")
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
for params, result in items:
|
for params, result in items:
|
||||||
|
Reference in New Issue
Block a user