Skip to content

Commit

Permalink
Merge pull request #2827 from schafle/fix-2823
Browse files Browse the repository at this point in the history
[Fixed 2823] Checking if .env is file before prompting to install dotenv
  • Loading branch information
lepture committed Jun 14, 2018
2 parents 673e5af + 076dddb commit b2ec6a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def load_dotenv(path=None):
.. versionadded:: 1.0
"""
if dotenv is None:
if path or os.path.exists('.env') or os.path.exists('.flaskenv'):
if path or os.path.isfile('.env') or os.path.isfile('.flaskenv'):
click.secho(
' * Tip: There are .env files present.'
' Do "pip install python-dotenv" to use them.',
Expand Down

0 comments on commit b2ec6a3

Please sign in to comment.