Skip to content

Commit 47a0086

Browse files
authored
Merge pull request pallets#2668 from pallets/tip-dotenv
Add tip for dotenv
2 parents cc51ace + 08e61ea commit 47a0086

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flask/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,11 @@ def load_dotenv(path=None):
585585
"""
586586

587587
if dotenv is None:
588+
if path or os.path.exists('.env') or os.path.exists('.flaskenv'):
589+
click.secho(
590+
' * Tip: There are .env files present.'
591+
' Do "pip install python-dotenv" to use them',
592+
fg='yellow')
588593
return
589594

590595
if path is not None:

0 commit comments

Comments
 (0)