-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Summary:
When running pipenv shell in POSIX (zsh), running /bin/activate will fail if there are parentheses in the virtualenv path due to the regex in _get_activate_script() (Line 53, pipenv/shells.py) not escaping parentheses properly.
How to reproduce the issue:
- Create a new directory
a ( ) - Create
.venvfolder inside the directory - Run
pipenv installina ( ) - Run
pipenv shell. The issue should now be reproduced. - To verify, run
pipenv shellagain to confirm the improper activation.
What is expected to happen:
Step 4 successfully activates virtual environment without error return code (1).
What actually happens:
Step 4 output:
$ pipenv shell
Launching subshell in virtual environment...
. /Users/leohku/a\ (\ )/.venv/bin/activate
zsh: no matches found: /Users/leohku/a ( )/.venv/bin/activateStep 5 output:
$ pipenv shell
Shell for UNKNOWN_VIRTUAL_ENVIRONMENT already activated.
No action taken to avoid nested environments.Environment:
pipenv, version 2020.11.15
running zsh on macOS Big Sur v11.1 x86
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels