"Loading .env environment variables..." prints to stderr, causing all sorts of havoc #6111
Labels
brainstorm
Contributor Candidate
The issue has been identified/triaged and contributions are welcomed/encouraged.
quiet
Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.
Make sure to mention your debugging experience if the documented solution failed.
Issue description
When a .env file is present in a working dir,
pipenv
prints outto stderr instead of stdout – causing the process to return with an exit code of 1, even if the process actually succeeded. Setting
PIPENV_VERBOSITY=-1
suppresses some of the other messages, like the warning about running inside a virtual env (which also writes to stderr), but it does not remove the .env message.It also does pipes the courtesy notice about running inside a virtualenv to stderr as well (this one I could probably understand and live with, though there doesn't seem to be a way to suppress this either).
Expected result
pipenv
should not write anything to stdout unless it is an actual error or failure.Actual result
The informational text is piped to stderr.
Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
You can reproduce this by creating a simple
requirements.txt
file in a dir, aPipfile
in a dir, and a.env
file in a dir, then running:The text was updated successfully, but these errors were encountered: