Fixed cloning a package (library) from a private Git repository with custom user name and SSH port // Resolve #925

This commit is contained in:
Ivan Kravets
2017-06-24 15:45:48 +03:00
parent d8a0272bec
commit 1c5b08de59
3 changed files with 12 additions and 4 deletions

View File

@ -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>`_)
-------

View File

@ -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():

View File

@ -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: