Skip to content

Commit b2ec6a3

Browse files
authored
Merge pull request pallets#2827 from schafle/fix-2823
[Fixed 2823] Checking if .env is file before prompting to install dotenv
2 parents 673e5af + 076dddb commit b2ec6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def load_dotenv(path=None):
584584
.. versionadded:: 1.0
585585
"""
586586
if dotenv is None:
587-
if path or os.path.exists('.env') or os.path.exists('.flaskenv'):
587+
if path or os.path.isfile('.env') or os.path.isfile('.flaskenv'):
588588
click.secho(
589589
' * Tip: There are .env files present.'
590590
' Do "pip install python-dotenv" to use them.',

0 commit comments

Comments
 (0)