bruno icon indicating copy to clipboard operation
bruno copied to clipboard

.env changes in WSL collections are not picked up until Bruno restarts

Open adam-mondo opened this issue 3 weeks ago • 1 comments

Internal - [BRU-5029]

On Windows, with a collection inside WSL (opened as \\wsl.localhost\<distro>\...), editing the collection's .env from inside WSL is not picked up: process.env.* keeps its old values until Bruno is restarted.

collection-watcher.js handles WSL by polling (usePolling: isWSLPath(watchPath)), because native file system events do not cross the WSL boundary. But .env files are ignored by that watcher and handled by dotenv-watcher.js, whose collection and workspace watchers do not set usePolling, so they never see changes made from the Linux side.

Steps to reproduce

  1. On Windows, open a collection stored in WSL (\\wsl.localhost\Ubuntu\home\...).
  2. From a WSL shell, change a value in the collection's .env.
  3. Send a request using {{process.env.THAT_KEY}}: it still has the old value. After restarting Bruno it has the new one.

Workaround: set CHOKIDAR_USEPOLLING=1 for Bruno, which forces polling on every watcher.

adam-mondo avatar Nov 09 '26 05:11 adam-mondo

Hi @adam-mondo, thanks for reporting this issue. I was able to replicate this!

I've shared this with our engineering team, and it's being evaluated alongside our other product priorities. While I can't promise a timeline at the moment, we'll make sure it gets reviewed as soon as possible, and we'll share any updates as they become available.

Moreover, thanks for raising a PR for this. One of our engineers will review this and if this follows our guidelines and sits well in our codebase we'll let you know.

We'll keep this thread updated with any progress or new information.

Rohan-Bruno avatar Nov 12 '26 06:11 Rohan-Bruno