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 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()