Merge pull request #2603 from pypa/rodxavier-master

Pass PIPENV_DOTENV_LOCATION directly to load_dotenv if present
This commit is contained in:
Tzu-ping Chung
2018-07-18 15:33:59 +08:00
committed by GitHub
+2 -3
View File
@@ -150,9 +150,8 @@ def load_dot_env():
if not PIPENV_DONT_LOAD_ENV:
# If the project doesn't exist yet, check current directory for a .env file
project_directory = project.project_directory or "."
denv = dotenv.find_dotenv(
PIPENV_DOTENV_LOCATION or os.sep.join([project_directory, ".env"])
)
denv = PIPENV_DOTENV_LOCATION or os.sep.join([project_directory, ".env"])
if os.path.isfile(denv):
click.echo(
crayons.normal("Loading .env environment variables…", bold=True),