Skip to content
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

Environment variable references in environment variables are not resolved with wt.exe #15191

Closed
anthonyvdotbe opened this issue Apr 16, 2023 · 3 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@anthonyvdotbe
Copy link
Contributor

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621.0

Other Software

No response

Steps to reproduce

  • open PowerShell and run the following 2 commands:
[Environment]::SetEnvironmentVariable('TEST_VAR1', 'foo', 'User')
[Environment]::SetEnvironmentVariable('TEST_VAR2', '%TEST_VAR1%', 'User')
  • open Windows Terminal via the start menu and run:
echo $Env:TEST_VAR2
  • open Windows Terminal via wt.exe (or Open in Terminal in File Explorer, but I assume that's the same thing) and run:
echo $Env:TEST_VAR2

Expected Behavior

The result is the same: foo.

Actual Behavior

The result is different: the first time it prints foo, the second %TEST_VAR1%.

Note there are similar open (#12545) and resolved (#12602, #11777) issues.

@anthonyvdotbe anthonyvdotbe added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 16, 2023
@developerA24
Copy link

The result is different: the first time it.

@zadjii-msft
Copy link
Member

This does sound a lot like /dup #12602. After #14999, we've made the behavior consistent with the explorer.exe launch (the "open Windows Terminal via the start menu" case) always.

@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service microsoft-github-policy-service bot added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants