Skip to content

Commit e6c8eff

Browse files
Add warning when load_dotenv has been disabled
1 parent e293438 commit e6c8eff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dotenv/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,9 @@ def load_dotenv(
354354
return False
355355

356356
if dotenv_path is None and stream is None:
357+
logger.warning(
358+
"python-dotenv has been disabled by DOTENV_AUTOLOAD_DISABLED environmental variable"
359+
)
357360
dotenv_path = find_dotenv()
358361

359362
dotenv = DotEnv(

0 commit comments

Comments
 (0)