Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle all failures when pwd does not exist. #857

Merged
merged 7 commits into from
Jan 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not write to .env if dotenv wasn't imported.
Signed-off-by: James Tanner <tanner.jc@gmail.com>
  • Loading branch information
jctanner committed Jan 31, 2023
commit 6712be9664322a095ff227295d2994ba767fd646
2 changes: 2 additions & 0 deletions dynaconf/loaders/env_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def load_from_env(

def write(settings_path, settings_data, **kwargs):
"""Write data to .env file"""
if not DOTENV_IMPORTED:
return
for key, value in settings_data.items():
quote_mode = (
isinstance(value, str)
Expand Down