PowerShell/test/powershell/engine
Dan Travison 4683934793 Update PowerShell to handle the case where the Windows PowerShell module path is already in the environment's PSModulePath (#7727)
This change updates ModuleIntrinsics.GetModulePath to handle the case where the Windows PowerShell module path is already in the environment's PSModulePath or when launched from a different version of PowerShell.

Previously, GetModulePath would append $PSHOME\Modules to the PSModulePath after removing the path for the launching version without considering the Windows PowerShell module path. The result, was the Windows PowerShell modules were found first and loaded incompatible modules; such as the built-in modules.

The change detects the Windows PowerShell module path and inserts $PSHOME\Modules path before it. The new test simulates launching from a different version of pwsh that has already added the Windows PowerShell module path.

Fixes #7679
2018-09-10 10:58:38 -07:00
..
Api Adding 'LanguagePrimitives.TryCompare' to provide faster comparisons (#7438) 2018-08-10 10:20:27 -07:00
Basic [Feature] Address code review comments 2018-07-12 17:17:50 -07:00
Cdxml Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
COM Use new Pester syntax: -Parameter for Pester tests in engine. (#6298) 2018-03-14 12:13:32 -07:00
ETS Make Select-Object/ForEach-Object/Where-Object see dynamic properties (#6898) 2018-06-12 23:48:34 -07:00
ExperimentalFeature [Feature] Address Feedback: Fix style and xml doc issues. Update tests 2018-07-10 12:46:48 -07:00
Help Save modules to un-versioned folder to enable servicing (#7518) 2018-08-14 10:15:05 -07:00
Job Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
Module Update PowerShell to handle the case where the Windows PowerShell module path is already in the environment's PSModulePath (#7727) 2018-09-10 10:58:38 -07:00
ParameterBinding Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
Remoting Update 'SSHConnectionInfo Class Tests' $skipTest expression to use collection semantics instead of relying on $null (which causes a type cast exception). (#7610) 2018-08-23 15:10:39 -07:00
ResourceValidation Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00