| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The Get-PSSession fix is critical for anyone who wants to run PS 7 in critical production environments and so uses $ErrorActionPreference = 'Stop'. It cannot be overridden manually with -ErrorActionPreference:Continue; the only workaround is to set the variable to Continue and then run it, but then you require extra code to detect and parse if any errors occurred loading the module. Alternately, Import-WinModule can be used instead. Hope this gets merged in and made available ASAP. |
Sorry, something went wrong.
|
Ilya (@iSazonov) looks like this is ready for merge. |
Sorry, something went wrong.
|
🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
|
🎉v7.0.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
* Filter PSModulePath when starting PS 5.1. Removing PS-Core-specific paths from PSModulePath of WinCompat process (Windows PS). * Make implicit WinCompat respect NoClobber and Scope parameters * Add ErrorAction.Ignore when searching for WinPSCompatSession # Conflicts: # src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs
* Filter PSModulePath when starting PS 5.1. Removing PS-Core-specific paths from PSModulePath of WinCompat process (Windows PS). * Make implicit WinCompat respect NoClobber and Scope parameters * Add ErrorAction.Ignore when searching for WinPSCompatSession
| Back | FazBrowse Home | New Git URL |
PR Summary
Several small fixes to some WinCompat scenarios:
Removing PS-Core-specific paths from PSModulePath of WinCompat process (Windows PS). Similar change was done previously by Allow pwsh to inherit $env:PSModulePath and enable powershell.exe to start correctly #11057 for NativeCommandProcessor. This PR enables same
PSModulePath behavior for WinCompat process (Windows PS) and job's process (Windows PS - for jobs started with -PSVersion 5.1). Without this change there could be bad cases when WinCompat process was loading PS-Core versions of the modules.
Some implicit WinCompat scenarios were ignoring -NoClobber and -Scope parameters. This is now fixed.
Get-PSSession -Name generates an error when the session is not found (in addition to returning nothing). When WinCompat uses Get-PSSession to search for existing WinPSCompatSession session to reuse, such error is not shown to the user but it is written to the error stream. Considering that it is normal for WinPSCompatSession session to not be there before the first WinCompat module import, such error is expected but it may confuse user if it is found in the error stream. The fix is to do Get-PSSession -Name WinPSCompatSession -ErrorAction Ignore.
Fix The remote session with the name WinPSCompatSession is not available #11903
Fixed a test bug in ModulePath.Tests.ps1.
PR Checklist