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

Some system-defined environment variables are undefined #7399

Closed
nathpete-msft opened this issue Aug 25, 2020 · 4 comments · Fixed by #7401
Closed

Some system-defined environment variables are undefined #7399

nathpete-msft opened this issue Aug 25, 2020 · 4 comments · Fixed by #7401
Labels
Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Blocking We won't ship a release like this! No-siree.
Milestone

Comments

@nathpete-msft
Copy link
Member

nathpete-msft commented Aug 25, 2020

Environment

Windows build number: 10.0.20201.0
Windows Terminal version (if applicable): 1.3.2372.0

Any other software? Nope

Steps to reproduce

In Powershell: $Env:UserName

In cmd: echo %UserName%

It looks like this variable is defined here: HKEY_CURRENT_USER\Volatile Environment

There are a couple of other variables defined there that are also undefined: %USERDOMAIN% and %USERDNSDOMAIN%

This is only happing after updating to the preview version of Terminal 1.3. The variables are still defined in Terminal 1.2, and when running pwsh/Windows Powershell/cmd outside of Terminal.

Expected behavior

The variable should contain the current user name.

Actual behavior

The variable is undefined.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 25, 2020
@DHowett
Copy link
Member

DHowett commented Aug 25, 2020

Regressed w/ #7243.

@DHowett DHowett added this to the Terminal v1.4 milestone Aug 25, 2020
@DHowett DHowett added Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. labels Aug 25, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 25, 2020
@zadjii-msft
Copy link
Member

Should this block 1.3?

@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Aug 25, 2020
@DHowett
Copy link
Member

DHowett commented Aug 25, 2020

Yeah probably.

@DHowett DHowett modified the milestones: Terminal v1.4, Terminal v1.3 Aug 25, 2020
@DHowett DHowett added the Severity-Blocking We won't ship a release like this! No-siree. label Aug 25, 2020
@DHowett
Copy link
Member

DHowett commented Aug 25, 2020

Investigating: profile API does EXPLICITLY add these vars (!) so i bet it's my token code

nathpete-msft added a commit to nathpete-msft/terminal that referenced this issue Aug 25, 2020
@ghost ghost added the In-PR This issue has a related PR label Aug 25, 2020
@ghost ghost closed this as completed in #7401 Aug 25, 2020
@ghost ghost removed the In-PR This issue has a related PR label Aug 25, 2020
ghost pushed a commit that referenced this issue Aug 25, 2020
This fixes a regression in environment variable loading introduced as part
of the new environment block creation that prevents some system-defined,
volatile environment variables from being defined.

## References
#7243 (comment)

## Validation Steps Performed
Manually verified locally.

Closes #7399
@ghost ghost added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Aug 25, 2020
DHowett pushed a commit that referenced this issue Aug 25, 2020
This fixes a regression in environment variable loading introduced as part
of the new environment block creation that prevents some system-defined,
volatile environment variables from being defined.

## References
#7243 (comment)

## Validation Steps Performed
Manually verified locally.

Closes #7399

(cherry picked from commit 64f10a0)
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Blocking We won't ship a release like this! No-siree.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants