★ wanayoo — archive 1999 https://github.com/PowerShell/PowerShell/pull/7727Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On launch, insert PSHOME\Modules into PSModulePath before the Windows PowerShell module path #7727

Merged
merged 2 commits into from Sep 10, 2018

Conversation

@dantraMSFT
Copy link
Contributor

commented Sep 6, 2018

Fix #7679

PR Summary

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.

PR Checklist

@dantraMSFT dantraMSFT requested review from daxian-dbw, rjmholt and SteveL-MSFT Sep 6, 2018

@dantraMSFT dantraMSFT requested a review from BrucePay as a code owner Sep 6, 2018

@rjmholt

rjmholt approved these changes Sep 7, 2018

Copy link
Member

left a comment

LGTM

@dantraMSFT dantraMSFT requested a review from TravisEz13 Sep 8, 2018

@TravisEz13 TravisEz13 self-assigned this Sep 8, 2018

@TravisEz13 TravisEz13 merged commit 4683934 into PowerShell:master Sep 10, 2018

8 checks passed

CodeFactor No issues found.
Details
PowerShell-CI-linux #PR-7727-20180907.01 succeeded
Details
PowerShell-CI-macos #PR-7727-20180907.01 succeeded
Details
PowerShell-CI-windows #PR-7727-20180907.01 succeeded
Details
WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details

@dantraMSFT dantraMSFT deleted the dantraMSFT:dantra/issue7679 branch Sep 10, 2018

@SteveL-MSFT SteveL-MSFT added this to the 6.1.x-servicing milestone Sep 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.