diff --git a/news/4851.bugfix.rst b/news/4851.bugfix.rst new file mode 100644 index 00000000..1e578297 --- /dev/null +++ b/news/4851.bugfix.rst @@ -0,0 +1 @@ +Return an empty dict when ``PIPENV_DONT_LOAD_ENV`` is set. diff --git a/pipenv/core.py b/pipenv/core.py index 68822d93..feb323c0 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -2459,7 +2459,7 @@ def do_run(project, command, args, three=None, python=False, pypi_mirror=None): ) env = os.environ.copy() - env.update(load_dot_env(project, as_dict=True)) + env.update(load_dot_env(project, as_dict=True) or {}) env.pop("PIP_SHIMS_BASE_MODULE", None) path = env.get('PATH', '')