Open
Description
set_key
states "If the .env path given doesn't exist, fails instead of risking creating an orphan .env somewhere in the filesystem".
set_key
has no check if the file exists. As it uses rewrite
which if path passed is not a file, it creates an empty file.
if not os.path.isfile(path):
with open(path, mode="w", encoding=encoding) as source:
source.write("")
python-dotenv/src/dotenv/main.py
Line 134 in 3ffcef6
Metadata
Metadata
Assignees
Labels
No labels