Skip to content

Commit

Permalink
Fix git+ssh url parsing for requirements
Browse files Browse the repository at this point in the history
- Fixes #1393
  • Loading branch information
techalchemy committed Mar 6, 2018
1 parent d8abe1e commit f021da2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ def pip_install(

# Install dependencies when a package is a VCS dependency.
try:
req = get_requirement(package_name.split('--hash')[0].split('--trusted-host')[0]).vcs
req = get_requirement(package_name.split('--hash')[0].split('--trusted-host')[0], verbose=verbose).vcs
except (pip._vendor.pyparsing.ParseException, ValueError) as e:
click.echo('{0}: {1}'.format(crayons.red('WARNING'), e), err=True)
click.echo(
Expand Down Expand Up @@ -2428,7 +2428,7 @@ def do_clean(

installed_package_names = []
for installed in installed_packages:
r = get_requirement(installed)
r = get_requirement(installed, verbose=verbose)

# Ignore editable installations.
if not r.editable:
Expand Down
5 changes: 3 additions & 2 deletions pipenv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from piptools.resolver import Resolver
from piptools.repositories.pypi import PyPIRepository
from piptools.scripts.compile import get_pip_command
from piptools import logging
from piptools import logging as piptools_logging
from piptools.exceptions import NoCandidateFound
from pip.download import is_archive_file
from pip.exceptions import DistributionNotFound
Expand Down Expand Up @@ -140,7 +140,7 @@ def get_requirement(dep):
elif req.local_file and path and not req.vcs:
req.path = path
req.uri = None
elif req.vcs and req.uri and cleaned_uri and uri != req.uri:
elif req.vcs and req.uri and cleaned_uri and cleaned_uri != uri:
req.uri = strip_ssh_from_git_uri(req.uri)
req.line = strip_ssh_from_git_uri(req.line)
req.editable = editable
Expand Down Expand Up @@ -314,6 +314,7 @@ class PipCommand(pip.basecommand.Command):

if verbose:
logging.log.verbose = True
piptools_logging.log.verbose = True


resolved_tree = set()
Expand Down

0 comments on commit f021da2

Please sign in to comment.