-
Notifications
You must be signed in to change notification settings - Fork 95
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
Request to change default installation path for user modules #724
Comments
Related/Duplicate: https://github.com/PowerShell/PowerShellGet/issues/627 |
Related Linux should follow DBG conventions and save it in ~/.config/powershell/Modules |
100% support this. The target path (for windows) makes perfect sense as well. Regarding migration:
|
I second I would like to have a trivial way to inquire where the I don't think |
Install Path locations are pseudo-hard coded into PSGetV2 and PSGetV3. Either those modules should expose an API for the install locations or (even better), PowerShell engine should have an API that produces the recommended paths that is customizable preferably by a Cmdlet you put in your profile but a config.json or config.psd1 file somewhere would also work |
Here is where it is defined in PSGetv3 |
Summary of the new feature / enhancement
In the latest versions of OneDrive, the Documents folder is synchronized by default. This creates challenges for PowerShell users. Some might not want modules to "roam" between machines. In other cases, an organizational "My" folder always contains two spaces in the name following the pattern "OneDrive - OrgName". The spaces require using an 8.3 folder name or putting the path in quotations, which is extra work.
A community-suggested workaround is to move the default module path. The discussion resolved the best location to be ~/AppData/Local/PowerShell/Modules. The PowerShell committee has discussed and agrees with the approach and acknowledges that multiple steps in a coordinated effort will be required to reach the end goal without breaking compatibility.
PowerShell/PowerShell#15552
Proposed technical implementation details (optional)
Two options for consideration, regarding Install-PSResource:
1 - Add a new parameter -InstallPath and set the default to $Env:HOMEPATH\AppData\Local\PowerShell\Modules.
2 - Just change the path where modules are installed to $Env:HOMEPATH\AppData\Local\PowerShell\Modules, without adding a parameter.
Additional options and considerations are welcome. If this is accepted, PWSH could add the path to PSModulePath (in addition to the existing) in a near-term release.
The text was updated successfully, but these errors were encountered: