-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminal not reading updated environment variables #8862
Comments
Well this is just the dickens, I can't seem to get this to repro: @DHowett any ideas here? I'm at a loss |
HI @zadjii-msft! I would like to apologize for taking up your time. You see, SteelSeries is a company that makes gaming peripherals. I have a keyboard with some extra hotkeys - that I can assign to launch any apps with a single key. The SteelSeries Engine is used to manage/run the keyboard. I have assigned various keys to run different Windows Terminal profiles (CMD, PowerShell, WSL etc.). Since the processes launched by this Engine are children of the Engine itself, the processes won't have updated environment variables until and unless the Engine itself is restarted (so that the Engine itself runs with up to date variables in environment). I'll close this now. |
Interesting! Thanks for following up, I haven't heard of that before so it'll be good to keep my eye out for something like this in the future. |
Thanks for the details @rashil2000, it helped me! |
Welcome @LeoDupont! Glad to see another member of AutoHotKey gang. I switched to shortly thereafter (I have Windows key + Enter set to launch wt.exe) as it removed dependence on external keyboard. |
Very interesting! This helped me too. I use the Microsoft Mouse and Keyboard center to configure the launch hotkeys (1, 2 and 3) and had the same issue, when running windows terminal through it. |
from https://www.autohotkey.com/board/topic/63858-function-to-refresh-environment-variables/ |
Thanks for providing this answer. |
Environment
Steps to reproduce
Go to Start menu and Edit/Add any environment variables.
Expected behavior
Any shells launched through WT should have the updated environment variables.
Actual behavior
Nothing happens. Even if I restart all WT windows. I have to restart my PC for changes to reflect. I have tried both the Store versions and the GitHub releases.
Opening PowerShell or CMD from anywhere else works as expected, they have the updated variables.
The text was updated successfully, but these errors were encountered: