Only tweak workon_home if PIPENV_VENV_IN_PROJECT

* Otherwise we probably wont find the right virtualenv with pew
This commit is contained in:
Dan Ryan
2017-10-13 18:47:51 -04:00
parent 51a82b4cae
commit 3b93076aa5
+2 -1
View File
@@ -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)