4683934793
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 |
||
---|---|---|
.. | ||
assets/testmodulerunspace | ||
ModulePath.Tests.ps1 | ||
ModuleSpecification.Tests.ps1 | ||
NewModuleManifest.Tests.ps1 | ||
SubmodulePathInManifest.Tests.ps1 | ||
TestModuleManifest.Tests.ps1 |