From f363c97f52be7bf956199ca452920a0f34ecd394 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Sun, 5 Nov 2017 16:13:44 -0500 Subject: [PATCH] Fix git url scheme parsing consistent with pip - Follow pip methodology for boolean testing --- pipenv/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pipenv/utils.py b/pipenv/utils.py index cad2960e..b43b2a21 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -771,9 +771,9 @@ def is_vcs(pipfile_entry): if hasattr(pipfile_entry, 'keys'): return any(key for key in pipfile_entry.keys() if key in VCS_LIST) elif isinstance(pipfile_entry, six.string_types): - # This syntax is only valid with git - if pipfile_entry.startswith('git+git@'): - pipfile_entry = pipfile_entry.replace('git+git@', 'git+git://') + # Add scheme for parsing purposes, this is also what pip does + if pipfile_entry.startswith('git+') and '://' not in pipfile_entry: + pipfile_entry = pipfile_entry.replace('git+', 'git+ssh://') return bool(requirements.requirement.VCS_REGEX.match(pipfile_entry)) return False