-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Type: Enhancement 💡This is a feature or enhancement request.This is a feature or enhancement request.
Description
Issue description
pipenv --py adds newlines. For instance
python -c "import subprocess; print(subprocess.Popen(['pipenv', '--py'], stdout=subprocess.PIPE).stdout.read())"
Expected result
should print something like b'/home/user/.local/share/virtualenvs/name-hash/bin/python\n'
Actual result
but actually prints things like b'/home/user/.local/share/virtualenvs/name-hash/bin/p\nython\n'. This is due to
Line 771 in e45cc7a
| console.print(project._which("python", allow_global=system)) |
Steps to replicate
- make the console small enough so the path doesn't fit on one line
- run
python -c "import subprocess; print(subprocess.Popen(['pipenv', '--py'], stdout=subprocess.PIPE).stdout.read())"
This is an issue if run as part of a script or application, for instance here. Maybe add the argument bare similar to
pipenv/pipenv/utils/virtualenv.py
Line 360 in e45cc7a
| def do_where(project, virtualenv=False, bare=True): |
Metadata
Metadata
Assignees
Labels
Type: Enhancement 💡This is a feature or enhancement request.This is a feature or enhancement request.