-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Fix WSLENV environment variable duplication in ConptyConnection #19167
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
Fix WSLENV environment variable duplication in ConptyConnection #19167
Conversation
Resolves microsoft#7130 Previously, WT_SESSION and WT_PROFILE_ID were always appended to WSLENV without checking if they already existed, causing duplication when multiple terminal sessions were created. This change: - Parses existing WSLENV content to avoid duplicates - Only adds WT_SESSION and WT_PROFILE_ID if not already present - Preserves existing environment variable flags - Maintains backward compatibility
@microsoft-github-policy-service agree |
Hi @DHowett ,could you take a look when you have time? |
Indeed! The team has been busy lately, but we will make sure to review this. Thank you very much for working on it! |
I made the following changes to your PR:
|
@lhecker Thanks for updating my PR and for your suggestions. I learned a lot from your changes! |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@lhecker you'll need to fix the audit build 🙂 |
@Weichenleeeee123 Thank you for the kind words. Normally I would've explained my "minor concerns" and made suggestions, but we're short-staffed and there's more work than we could ever handle. So, I did it myself while reviewing your code to save time. I apologize for that. 🙈🙈 If you could indeed gain something from my changes though, I'm very happy to hear that. Writing fundamental abstractions like |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
This PR fixes issue #7130 where WT_SESSION and WT_PROFILE_ID environment variables were being duplicated in the WSLENV environment variable when multiple terminal sessions were created. The previous implementation always appended WT_SESSION:WT_PROFILE_ID: to WSLENV without checking if these variables already existed, causing duplication. Closes #7130 Co-authored-by: Leonard Hecker <[email protected]> (cherry picked from commit 7d6e0c8) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdDF2w Service-Version: 1.23
Summary
This PR fixes issue #7130 where WT_SESSION and WT_PROFILE_ID environment variables were being duplicated in the WSLENV environment variable when multiple terminal sessions were created.
References and Relevant Issues
Closes #7130
Detailed Description
The previous implementation always appended WT_SESSION:WT_PROFILE_ID: to WSLENV without checking if these variables already existed, causing duplication.
Changes Made:
Validation Steps Performed
PR Checklist