Set PIPENV_ACTIVE when running pipenv run

This commit is contained in:
Michael Wolf
2018-10-10 22:54:02 -05:00
committed by Dan Ryan
parent 9ff61c777b
commit 77f97aa058
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Set `PIPENV_ACTIVE=1` when running `pipenv run`. This is what `pipenv shell` already does.
+2
View File
@@ -2284,6 +2284,8 @@ def do_run(command, args, three=None, python=False, pypi_mirror=None):
# Ensure that virtualenv is available.
ensure_project(three=three, python=python, validate=False, pypi_mirror=pypi_mirror)
# Set an environment variable, so we know we're in the environment.
os.environ["PIPENV_ACTIVE"] = vistir.misc.fs_str("1")
load_dot_env()
# Activate virtualenv under the current interpreter's environment
inline_activate_virtual_environment()