rubymaniac / vscode-direnv

Automatically detect and load your .envrc
MIT License
32 stars 11 forks source link

run synchronously on process load, and restart extension host on change #14

Open timbertson opened 4 years ago

timbertson commented 4 years ago

12 made me think, it seems like the only way to guarantee direnv is setup before other extensions is to do it both synchronously (no promises in the initialization code) and at process startup (otherwise it depends on extension activation order).

When reloading, it actually causes the extension host to restart because again, that seems like the only reliable way to ensure the new env is applied.

Which makes for a pretty badly behaved extension in some ways (it takes effect even if it's deactivated), but I don't see much alternative if we want to guarantee it happens first.