mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47: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>`__
|
||||
does not handle custom ``src_dir``
|
||||
(`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 = "://"
|
||||
|
||||
req_conditions = [
|
||||
not requirements, "@" in text,
|
||||
(url_marker != "git@" and "://git@" not in text) or
|
||||
text.count("@") > 1
|
||||
]
|
||||
not requirements,
|
||||
"@" in text,
|
||||
not url_marker.startswith("git")
|
||||
] # yapf: disable
|
||||
if all(req_conditions):
|
||||
text, requirements = text.rsplit("@", 1)
|
||||
if text.isdigit():
|
||||
|
@ -127,6 +127,11 @@ def test_pkg_input_parser():
|
||||
"git+ssh://git@gitlab.private-server.com/user/package#1.2.0",
|
||||
("package", None,
|
||||
"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:
|
||||
|
Reference in New Issue
Block a user