Repository navigation
GetPersonalModulePath() should be made a public method, and be configurable from powershell.config.json #18613
Description
Activity
- addedIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.
on Nov 18, 2022 I believe James Truher (@JamesWTruher) was going to tackle this as a pre-requisite to #15552. Specifically exposing an API to retrieve the user, shared, and system module paths. This would be needed by PowerShellGet rather than using a priori knowledge. I believe Jim had some concerns with simply making those APIs public instead of some sanitized versions, but don't recall the details.
Reacted by Justin Grote- addedResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
on Nov 15, 2023 Can we please reactivate
JustinGrote commented
on Apr 4, 2024 ContributorAuthorMore actionsKirill Osenkov (@KirillOsenkov) for note I am not a maintainer of the PowerShell repo, I'm just a community member, there's nothing I can do in this regard.
Reacted by Kirill Osenkovsorry I thought you could reactivate as the author
Ryan Yates (@kilasuit) not completed, please reopen
- addedKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeand removedResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
on Apr 12, 2024 - addedWG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working Group
on Apr 29, 2024 6 remaining items
- addedResolution-DeclinedThe proposed feature is declined.The proposed feature is declined.and removedNeeds-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.WG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working GroupKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-close
on Sep 16, 2024 SeeminglyScience commented
on Sep 16, 2024 ContributorMore actionsNote that I've marked it as declined here but it could probably more easily be labeled as duplicate. The feature itself is still planned and tracked separately, the specific implementation suggestion is declined. Hopefully that makes sense
Reacted by Justin GroteJustinGrote commented
on Sep 16, 2024 ContributorAuthorMore actionsYep makes sense, closing here.
microsoft-github-policy-service commented
on Sep 16, 2024 ContributorMore actions📣 Hey Justin Grote (@JustinGrote), how did we do? We would love to hear your feedback with the link below! 🗣️
🔗 https://aka.ms/PSRepoFeedback
microsoft-github-policy-service commented
on Sep 16, 2024 ContributorMore actions📣 Hey Justin Grote (@JustinGrote), how did we do? We would love to hear your feedback with the link below! 🗣️
🔗 https://aka.ms/PSRepoFeedback
Summary of the new feature / enhancement
"As a user, I want to specify where my modules are installed by default, such as a non-OneDrive path or another drive for performance"
While a powershell.config.json setting exists to allow configuration of the
PSModulePath, it does not allow someone to set the default install location for modules. The logic for this is hidden in an internal method, and as a result, products like PowerShellGet v2, PowershellGetv3, and ModuleFast have their own separate internal implementations that mirror this method.By making the method public, and making the target overridable in powershell.config.json, package management tools can tie into PowerShell to be consistent with the intent of the use.
Proposed technical implementation details (optional)
Update this to be public:
https://github.com/PowerShell/PowerShell/blob/9ae18ab0d18abea0569b691693e864adb77baeb5/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs#LL962-L970C10
And add a powershell.config.json setting that will be checked by this method and override the default behavior if specified.
I am willing to attempt a PR if this is marked
up-for-grabs