-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Auto-sync current directory in WinCompat remote session #11809
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
Conversation
test/powershell/Modules/Microsoft.PowerShell.Core/CompatiblePSEditions.Module.Tests.ps1
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
Outdated
Show resolved
Hide resolved
| # after WinCompat cleanup local $PWD changes should not cause errors | ||
| Remove-module $ModuleName -Force | ||
| Pop-Location | ||
| try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think all code after the first 'Push-Location' should be in the try. If any exception is thrown during the test the original location will be reverted through the finally 'Set-Location'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
PaulHigin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
# Conflicts: # src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs
|
🎉 Handy links: |
PR Summary
WinCompat uses background Windows PS remote session which has its own current directory. It has to be synchronized with local PS Core current directory for cases when proxy cmdlets rely on current directory.
This PR enables auto-sync of current directory in WinCompat remote session.
This came up in #11411 .
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.