Path to modules should always align to PSModulepath #1049
Copy link
Copy link
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
Currently the path is only built from psmodule path if the scope is null, which would not normally happen
https://github.com/PowerShell/PowerShellGet/blob/6fd032a5c84ddc67ff57ab90997829275f460396/src/code/Utils.cs#L632
Expected behavior
Install-PSResource should put modules in the location defined by psmodulepathActual behavior
The path is hard codedError details
No response
Environment data
beta20Visuals
No response
Reactions are currently unavailable
Activity
alerickson commentedon May 19, 2023
Current plan is to only provide support for hard coded paths. IE, install will only install to hard coded paths. Get-InstalledPSResource is a little more unclear. V2 does search within PSModulePath, however is it necessary to search within those paths if the concept behind "Install" is that PSGet manages the module lifecycle for you? That is to say, if you save to an arbitrary path PSGet will not necessarily be able to find it, and saving to the PSModulePath would be comprable to saving to an arbitrary path, so does PSGet need to support this scenario right now?
In the near future we plan to have support for PSModulePath, however what to do in the meantime is still a bit up in the air.