Idea for ability to optionally override default modules and scripts install path - Duscussion and contribution is welcome!#1673
Draft
o-l-a-v wants to merge 63 commits intoPowerShell:masterfrom
Draft
Conversation
…ke path to returning standard paths shorter
…ke path to returning standard paths shorter
…werShell--PSResourceGet into install-path-override
Contributor
Author
|
@anamnavi, @alerickson Have you had any time to check out this idea? Any thoughts? 🤔 Edit: It's probably better to use
Whichever solution you want for PSResourceGet, let's make it happen. I can try to do it, but I'd first want to hear what alternative you'd like. 🙂 Edit 2: Seems Windows PowerShell does not support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
What
I'm experimenting with a way to override PSResourceGet install path for modules and scripts, suggested in my comment #1494 (comment).
This PR already got the basic logic working for getting the path override if present! 🥳
Todo
PSResourceGetInstallPathOverrideif present and use it instead of default paths.Set-PSResourceInstallPathOverride -Path <path> -Scope <CurrentUser|AllUsers>.PSResourceGetInstallPathOverrideand add it toPSModulePathif not already there.-WhatIfGet-PSResourceGetInstallPathOverride?Remove-PSResourceGetInstallPathOverride?Get-PSResourcesearches for all paths inPSModulePathGet-PSResourcedoes not search in user context environment variablePSModulePath#889Related issues / feature requests
%OneDriveCommercial%if OneDrive for Business Known Folder Move (KFM) is enabled #627Get-PSResourcedoes not search in user context environment variablePSModulePath#889PR Context
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.