Skip to content

Flush and fsync before replacing .env files - #717

Open
Imkkey wants to merge 1 commit into
theskumar:mainfrom
Imkkey:fix/fsync-before-replace
Open

Imkkey wants to merge 1 commit into
theskumar:mainfrom
Imkkey:fix/fsync-before-replace

Conversation

@Imkkey

@Imkkey Imkkey commented Oct 2, 2026 •

Copy link
Copy Markdown

Fixes #713. Flush the temporary file and call os.fsync before replacing the original .env file. Added tests for write ordering and keeping the original file intact if syncing fails.
All 295 tests pass, along with Ruff and mypy checks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set_key and unset_key don't fsync before replacing the .env file

1 participant