diff --git a/pipenv/core.py b/pipenv/core.py index a6372ad2..af4c9761 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -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),