Skip to content

Commit

Permalink
Merge pull request #1241 from OddBloke/1240
Browse files Browse the repository at this point in the history
Don't shellquote backup Python executable
  • Loading branch information
kennethreitz committed Jan 11, 2018
2 parents 394bf30 + c4aa4d2 commit 5959b3c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipenv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ class PipCommand(pip.basecommand.Command):
),
err=True)

click.echo(crayons.blue(e))
click.echo(crayons.blue(str(e)))

if 'no version found at all' in str(e):
click.echo(crayons.blue('Please check your version specifier and version number. See PEP440 for more information.'))
Expand All @@ -535,7 +535,7 @@ def resolve_deps(deps, which, which_pip, project, sources=None, verbose=False, p
markers_lookup = {}

python_path = which('python', allow_global=allow_global)
backup_python_path = shellquote(sys.executable)
backup_python_path = sys.executable

results = []

Expand Down
24 changes: 24 additions & 0 deletions tests/test_pipenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,30 @@ def test_windows_pinned_pipfile(self):
assert 'tablib' in p.lockfile['default']


@pytest.mark.e
@pytest.mark.install
@pytest.mark.vcs
@pytest.mark.resolver
def test_editable_vcs_install_in_pipfile_with_dependency_resolution_doesnt_traceback(self):
# See https://github.com/pypa/pipenv/issues/1240
with PipenvInstance() as p:
with open(p.pipfile_path, 'w') as f:
contents = """
[packages]
pypa-docs-theme = {git = "https://github.com/pypa/pypa-docs-theme", editable = true}
# This version of requests depends on idna<2.6, forcing dependency resolution
# failure
requests = "==2.16.0"
idna = "==2.6.0"
""".strip()
f.write(contents)
c = p.pipenv('install')
assert c.return_code == 1
assert "Your dependencies could not be resolved" in c.err
assert 'Traceback' not in c.err


@pytest.mark.run
@pytest.mark.install
def test_multiprocess_bug_and_install(self):
Expand Down

0 comments on commit 5959b3c

Please sign in to comment.