From 21d34482daf3b5753546036c98c6e5c42577660f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 2 Sep 2016 22:41:27 +0300 Subject: [PATCH] Fix package manager when "git@url" is used --- platformio/vcsclient.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platformio/vcsclient.py b/platformio/vcsclient.py index 0d3af892..a509302b 100644 --- a/platformio/vcsclient.py +++ b/platformio/vcsclient.py @@ -28,11 +28,16 @@ class VCSClientFactory(object): def newClient(src_dir, remote_url): result = urlparse(remote_url) type_ = result.scheme - if "+" in result.scheme: + if not type_ and remote_url.startswith("git@"): + type_ = "git" + elif "+" in result.scheme: type_, _ = result.scheme.split("+", 1) remote_url = remote_url[len(type_) + 1:] if result.fragment: remote_url = remote_url.rsplit("#", 1)[0] + if not type_: + raise PlatformioException("VCS: Unknown repository type %s" % + remote_url) obj = getattr(modules[__name__], "%sClient" % type_.title())( src_dir, remote_url, result.fragment) assert isinstance(obj, VCSClientBase)