Skip to content

Conversation

sandydoo
Copy link
Member

@sandydoo sandydoo commented May 19, 2025

The main cause was truncate(true), which should've been truncate(false). We ended up always writing to the files that could trigger direnv to reload.

I've added a test to attempt to catch issues with direnv before we release. 60% confident it works 🙃

Fixes #1891.

sandydoo added 2 commits May 20, 2025 00:32
This helps reduce accidental direnv triggers.
Fixes a typo that would truncate files after opening, when we're trying
to reduce unnecessary modifications.
@sandydoo sandydoo added the bug Something isn't working label May 19, 2025
Copy link

cloudflare-workers-and-pages bot commented May 19, 2025

Deploying devenv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 701fa39
Status: ✅  Deploy successful!
Preview URL: https://4cac5dbf.devenv.pages.dev
Branch Preview URL: https://direnv-safe-writes.devenv.pages.dev

View logs

Test that simply evaluating a shell does not trigger direnv to reload
immediately.
@domenkozar domenkozar merged commit 69d43e0 into main May 20, 2025
7 checks passed
@sandydoo sandydoo deleted the direnv-safe-writes branch May 20, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Devenv + Direnv VSCode spawns infinite nix processes reintroduced
2 participants