-
Notifications
You must be signed in to change notification settings - Fork 8.1k
A new public API for getting locations of PSModulePath elements #19422
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
Conversation
src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
Outdated
Show resolved
Hide resolved
ddf2f54 to
efcacb9
Compare
SteveL-MSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this here by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no - it's used by the tests (line 199)
efcacb9 to
c3c4ad8
Compare
src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if the parameter name should be scope to be consistent with other cmdlets and PowerShellGet.
This should provide a consistent way to retrieve the module path element for PSHOME, the user directory, and the shared location.
Additional tests and add locations for user and shared tests.
Require elevation for tests since we're install an allscope module.
30811cb to
d300914
Compare
PaulHigin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Needed because we install a module into shared location.
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
@JamesWTruher Can you open a Docs issue for this change? |
|
🎉 Handy links: |
PR Summary
A new public API for retrieving the PSModulePath element for PSHOME, User, and Shared locations.
PR Context
Retrieving the locations for the possible locations for portions of the Module path have been inconsistent. This is a new public api which enables 3rd party tools to have a consistent way to retrieve this information. It should also allow PowerShellGet to simplify code for installations in PowerShell 7.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).