-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Order of environment variables different in WT #9233
Comments
I do not believe that the order of environment variables is a contract anybody needs to uphold. WT requests that the system generate a new environment block for every new subprocess, so this is the order returned by the system. |
I'm marking this "Won't Fix". If you can provide a reason why this matters to any software, I'll be happy to reopen it 😄 |
See Changing Environment Variables:
One aspect left unstated by the above quote is that the case-insensitive comparison converts to uppercase. For example, An incorrect order may cause Windows Terminal calls |
To be clear, it is not the order that |
The behavior I mentioned seems to conflict with the documentation mentioned by @eryksun. I don't know about upholding contracts, but what about tradition ... programs working as thay have for decades? This just plain looks bad. As for
it makes environment variables hard to find when they're not where they're expected to be (and where they belong) in the list. |
I, too, have confirmed (as @eryksun alluded to) CreateEnvironmentBlock() puts __VIP at the end. |
Please reopen this issue. |
Huh, wild. |
Thank you! |
Actually yea I'm gonna reckon it probably wasn't. |
This is fixed by #15082 |
The map was ordered, it was just ordered wrongly 🙂 |
Existing environment variables can be referenced by enclosing the name in percent characters (e.g. `%PATH%`). Resurrects #9287 by @christapley. Tests added and manually tested. Closes #2785 Closes #9233 Co-authored-by: Chris Tapley <chris.tapley.81@gmail.com>
Environment
Microsoft Windows 10 Pro for Workstations
10.0.19042.804 (2009, 20H2)
Windows Terminal Preview
Version: 1.6.10412.0
Steps to reproduce
See below.
Expected behavior
Same behavior whether in WT or not
Actual behavior
Behavior different and undesirable when in WT.
In my three Windows shells (CMD, Powershell, TCC), when running in WT
Here's a new CMD.EXE running in a Windows console; this is expected behavior.
And here's a new CMD.EXE running in Windows Terminal. Note that the variables __VIP (from the user environment) and WT (newly created) are out of place.
The text was updated successfully, but these errors were encountered: