-
-
Notifications
You must be signed in to change notification settings - Fork 578
Environment Variables (PATH) are aggressively cached to disk and persist across app restarts #4367
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Flow Launcher seems to cache the OS Environment Variables (like PATH) to a physical disk cache. If a user updates the Windows System PATH, Flow Launcher completely ignores the OS updates and forces child processes (like CMD) to inherit a stale environment block.
Example:
- Add a new CLI tool directory to the Windows System PATH.
- Completely quit and restart Flow Launcher.
- Launch CMD via Flow Launcher -> The new PATH is missing.
- Go to Flow settings -> About -> Click "Clear Cache".
- Launch CMD via Flow again -> The new PATH is STILL missing (Live memory isn't refreshed).
- Quit Flow Launcher completely AFTER clearing the cache, reopen it, and launch CMD -> Only now does the new PATH appear.
Caching OS environment variables to a local file to speed up boot times is inherently flawed. Furthermore, the "Clear Cache" function deletes the file but fails to flush and refresh the live environment block for the current session.
Suggestion:
- Do not cache
Environment.GetEnvironmentVariables()to disk. It must be queried dynamically at startup. - The app must listen to the
WM_SETTINGCHANGEbroadcast to refresh its environment block automatically during runtime.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request