Merge pull request #1034 from techalchemy/bugfix/git-url-ssh-scheme-fix

Fix git url scheme parsing consistent with pip
This commit is contained in:
Nate Prewitt
2017-11-05 16:19:07 -08:00
committed by GitHub
+3 -3
View File
@@ -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