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

The environment variables of "Open in Windows Terminal" and "Manually Start Windows Terminal" are inconsistent. #12602

Closed
TigerBeanst opened this issue Mar 1, 2022 · 10 comments · Fixed by #14999
Labels
Area-ShellExtension For issues related to the explorer right-click context menu Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@TigerBeanst
Copy link

TigerBeanst commented Mar 1, 2022

Windows Terminal version

1.11.3471.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

First, add D:\DHYProjects\Las2Osgt\osg; to Path in environment variable.

image

  1. Right click in Explorer, then click "Open in Windows Terminal"(Chinese: 在 Windows 终端中打开

Mark as WT1:
image

and Manually Start Windows Terminal, mark as WT2:

image

  1. Check Path environment variable:

image

Expected Behavior

Their values should be exactly the same.

Actual Behavior

I can't find D:\DHYProjects\Las2Osgt\osg in WT1, which is started by right-click in explorer.

I have trid to kill explorer.exe and restart it in Task Manager. It doesn't work.

It looks like I'll have to reboot my computer to get it work.

@TigerBeanst TigerBeanst added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Mar 1, 2022
@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 Mar 1, 2022
@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Mar 3, 2022
@wkl007
Copy link

wkl007 commented Mar 5, 2022

I have the same issue

@zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Area-ShellExtension For issues related to the explorer right-click context menu labels Mar 7, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Mar 7, 2022
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Mar 11, 2022
@ghost
Copy link

ghost commented Mar 11, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@TigerBeanst
Copy link
Author

TigerBeanst commented Mar 12, 2022

Is the Terminal already running when you open a new tab via the Explorer context menu?
No. I closed all Terminal windows and try it.

A screenrecord:
https://drive.google.com/file/d/1CKwLFEboC46t7Na4dYGSk8XcpTQJFLib/view?usp=sharing

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Mar 12, 2022
@stzb321

This comment was marked as spam.

@MrDach
Copy link

MrDach commented Sep 26, 2022

Any updates on this? It's slightly annoying having to open Terminal via the start menu and having to navigate to the folder every time.

@madmax91
Copy link

madmax91 commented Oct 11, 2022

This is what worked for me to fix this issue:
Go to Settings > Apps > Apps & Features > Terminal and click on Terminate, this will kill all the Terminal processes and related processes and will refresh the cached variables I suppose. After this even if I launch the Terminal from context menu it has the correct variables loaded.

It looks like that windows allows this app and its processes to run in the background even after you close the window. So if you closed the window and changed some Environment variables if any of these processes are left running in the background it will not refresh them fully. It is still strange as why it is refreshing the variables for the instance launched via start menu but not for the instance that is launched via context menu.

@bestK
Copy link

bestK commented Oct 28, 2022

If you use autohotkey, see #8862 (comment)

@TheComputerM
Copy link

Having the same problem with pnpm. Opening the terminal from the start menu works properly but opening the terminal from the right click context menu will not have PNPM_HOME environment variable set correctly.

@zadjii-msft
Copy link
Member

zadjii-msft commented Mar 24, 2023

This almost certainly was resolved by #14999.

Yep, I just checked this on a fresh off main build of the Terminal, and this looks fixed to me. This'll be fixed in 1.18, which should be coming out sometime Q2-ish. That's about as accurate as I can be with a release date. Thanks all!

@zadjii-msft zadjii-msft added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Mar 24, 2023
@zadjii-msft zadjii-msft added this to the Terminal v1.18 milestone Mar 24, 2023
@zadjii-msft zadjii-msft removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. labels Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ShellExtension For issues related to the explorer right-click context menu Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants