re-add setting to make environment active when running shell

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2019-03-10 17:32:47 -04:00
parent cfd1e5992e
commit 77bac23f93
+7 -1
View File
@@ -1441,7 +1441,7 @@ def pip_install(
ignore_hashes = True
else:
ignore_hashes = True if not requirement.hashes else False
install_reqs = requirement.as_line(as_list=True)
install_reqs = requirement.as_line(as_list=True, include_hashes=not ignore_hashes)
if not requirement.markers:
install_reqs = [escape_cmd(r) for r in install_reqs]
elif len(install_reqs) > 1:
@@ -2301,6 +2301,12 @@ def do_shell(three=None, python=False, fancy=False, shell_args=None, pypi_mirror
project.project_directory,
shell_args,
)
# Only set PIPENV_ACTIVE after finishing reading virtualenv_location
# Set an environment variable, so we know we're in the environment.
# otherwise its value will be changed
os.environ["PIPENV_ACTIVE"] = vistir.misc.fs_str("1")
os.environ.pop("PIP_SHIMS_BASE_MODULE", None)
if fancy:
shell.fork(*fork_args)