mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Miscellaneous minor updates to WinCompat (#11980)
* 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
This commit is contained in:
@@ -165,9 +165,9 @@ Describe "SxS Module Path Basic Tests" -tags "CI" {
|
||||
|
||||
It 'Windows PowerShell does not inherit PowerShell paths' -Skip:(!$IsWindows) {
|
||||
$out = powershell.exe -noprofile -command '$env:PSModulePath'
|
||||
$out | Should -Not -Contain $expectedUserPath
|
||||
$out | Should -Not -Contain $expectedSharedPath
|
||||
$out | Should -Not -Contain $expectedSystemPath
|
||||
$out | Should -Not -BeLike "*$expectedUserPath*"
|
||||
$out | Should -Not -BeLike "*$expectedSharedPath*"
|
||||
$out | Should -Not -BeLike "*$expectedSystemPath*"
|
||||
}
|
||||
|
||||
It 'Windows PowerShell inherits user added paths' -Skip:(!$IsWindows) {
|
||||
|
||||
Reference in New Issue
Block a user