From f8b15b47772ed8aece62490c44541ae660220cf7 Mon Sep 17 00:00:00 2001 From: smac89 <8305511+smac89@users.noreply.github.com> Date: Fri, 25 Mar 2022 15:00:39 -0600 Subject: [PATCH 1/2] Bugfix: Not loading .env when quiet --- pipenv/core.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index b1e8d01ed1..ab3033ea0f 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -115,11 +115,12 @@ def load_dot_env(project, as_dict=False, quiet=False): ) if as_dict: return dotenv.dotenv_values(dotenv_file) - elif os.path.isfile(dotenv_file) and not quiet: - click.echo( - crayons.normal(fix_utf8("Loading .env environment variables..."), bold=True), - err=True, - ) + elif os.path.isfile(dotenv_file): + if not quiet: + click.echo( + crayons.normal(fix_utf8("Loading .env environment variables..."), bold=True), + err=True, + ) dotenv.load_dotenv(dotenv_file, override=True) project.s.initialize() From 1e2542c78f5cf47de793ef422b163c157546a0dd Mon Sep 17 00:00:00 2001 From: smac89 <8305511+smac89@users.noreply.github.com> Date: Fri, 25 Mar 2022 15:21:13 -0600 Subject: [PATCH 2/2] Create 5010.bugfix.md --- news/5010.bugfix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/5010.bugfix.md diff --git a/news/5010.bugfix.md b/news/5010.bugfix.md new file mode 100644 index 0000000000..e532226ba7 --- /dev/null +++ b/news/5010.bugfix.md @@ -0,0 +1 @@ +Environment variables were not being loaded when the `--quiet` flag was set