-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Let's move PSModulePath out of the documents folder #15552
Copy link
Copy link
Open
Labels
Area-PowerShellGetspecific to PowerShellGet modulespecific to PowerShellGet moduleBreaking-Changebreaking change that may affect usersbreaking change that may affect usersIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeRFC-RequiredWorking Groups have decided that an RFC is required for this contributionWorking Groups have decided that an RFC is required for this contributionWG-Engine-ModuleWG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working Group
Metadata
Metadata
Assignees
Labels
Area-PowerShellGetspecific to PowerShellGet modulespecific to PowerShellGet moduleBreaking-Changebreaking change that may affect usersbreaking change that may affect usersIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeRFC-RequiredWorking Groups have decided that an RFC is required for this contributionWorking Groups have decided that an RFC is required for this contributionWG-Engine-ModuleWG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working Group
Summary of the new feature/enhancement
The documents folder has always been where modules user-scoped are kept, and that's always been ok, but I recently discovered some problems with this as I've been getting more familiar with Azure and my work laptop maps Documents to OneDrive. This can be problematic for a few reasons, such as OneDrive not syncing correctly or trying to restore a bunch of files from a module I just uninstalled. This is particularly an issue with larger modules (or groups of modules) such as Az.*
We can certainly wish OneDrive was better at its job, but really these files shouldn't be there - they are not documents. The user is not expected to edit them or look at them. They are more akin to application files or application data. There's no value to them being in OneDrive other than to transfer them to another machine, and that can be better achieved by having a script in OneDrive that calls PSDepend or PowerShellGet to install modules on that other machine.
I have updated my profile script to remove this path but it reappears after running
install-module.Proposed technical implementation details (optional)
Documents\PowerShell\Modulesfrom the$env:PSModulePathdefault. Select a new default path such as~\PowerShell\Modulesor$env:localappdata\PowerShell\Modules