From 3b93076aa5a8b3dcb44ffb6a034d3d6930ea4d9c Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Fri, 13 Oct 2017 18:47:51 -0400 Subject: [PATCH] Only tweak workon_home if PIPENV_VENV_IN_PROJECT * Otherwise we probably wont find the right virtualenv with pew --- pipenv/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 154fd593..817f467c 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -2038,7 +2038,8 @@ def do_shell(three=None, python=False, fancy=False, shell_args=None): import subprocess # Tell pew to use the project directory as its workon_home with temp_environ(): - os.environ['WORKON_HOME'] = project.project_directory + if PIPENV_VENV_IN_PROJECT: + os.environ['WORKON_HOME'] = project.project_directory p = subprocess.Popen([cmd] + list(args), shell=True, universal_newlines=True) p.communicate() sys.exit(p.returncode)