PowerShell/test/powershell/engine/Module
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
..
assets/testmodulerunspace Update copyright and license headers (#6134) 2018-02-13 09:23:53 -08:00
ModulePath.Tests.ps1 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
ModuleSpecification.Tests.ps1 Fix module specification hashtable in ModuleSpecification.Tests.ps1 (#7663) 2018-09-04 10:06:35 -07:00
NewModuleManifest.Tests.ps1 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
SubmodulePathInManifest.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in engine. (#6298) 2018-03-14 12:13:32 -07:00
TestModuleManifest.Tests.ps1 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00