mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
+6
-5
@@ -40,7 +40,7 @@ from .environments import (
|
||||
PIPENV_COLORBLIND, PIPENV_NOSPIN, PIPENV_SHELL_COMPAT,
|
||||
PIPENV_VENV_IN_PROJECT, PIPENV_USE_SYSTEM, PIPENV_TIMEOUT,
|
||||
PIPENV_SKIP_VALIDATION, PIPENV_HIDE_EMOJIS, PIPENV_INSTALL_TIMEOUT,
|
||||
PYENV_INSTALLED, PIPENV_YES
|
||||
PYENV_INSTALLED, PIPENV_YES, PIPENV_DONT_LOAD_ENV
|
||||
)
|
||||
|
||||
# Backport required for earlier versions of Python.
|
||||
@@ -114,10 +114,11 @@ project = Project()
|
||||
|
||||
|
||||
def load_dot_env():
|
||||
denv = dotenv.find_dotenv(os.sep.join([project.project_directory, '.env']))
|
||||
if os.path.isfile(denv):
|
||||
click.echo(crayons.white('Loading .env environment variables…', bold=True), err=True)
|
||||
dotenv.load_dotenv(denv, override=True)
|
||||
if not PIPENV_DONT_LOAD_ENV:
|
||||
denv = dotenv.find_dotenv(os.sep.join([project.project_directory, '.env']))
|
||||
if os.path.isfile(denv):
|
||||
click.echo(crayons.white('Loading .env environment variables…', bold=True), err=True)
|
||||
dotenv.load_dotenv(denv, override=True)
|
||||
|
||||
|
||||
def add_to_path(p):
|
||||
|
||||
@@ -24,6 +24,9 @@ PIPENV_PIPFILE = os.environ.get('PIPENV_PIPFILE')
|
||||
# Tells pipenv to not try to install -e dependencies to get their dependency information.
|
||||
PIPENV_DONT_EAT_EDITABLES = bool(os.environ.get('PIPENV_DONT_EAT_EDITABLES'))
|
||||
|
||||
# Tells pipenv to not load .env files.
|
||||
PIPENV_DONT_LOAD_ENV = bool(os.environ.get('PIPENV_DONT_LOAD_ENV'))
|
||||
|
||||
# Tell Pipenv to default to yes at all prompts.
|
||||
PIPENV_YES = bool(os.environ.get('PIPENV_YES'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user