Skip to content

Commit

Permalink
Return an empty dict when PIPENV_DONT_LOAD_ENV is set.
Browse files Browse the repository at this point in the history
Close #4851
  • Loading branch information
frostming committed Nov 9, 2021
1 parent 9cafc59 commit 2dfdf2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/4851.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return an empty dict when ``PIPENV_DONT_LOAD_ENV`` is set.
2 changes: 1 addition & 1 deletion pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', '')
Expand Down

0 comments on commit 2dfdf2a

Please sign in to comment.