-
Notifications
You must be signed in to change notification settings - Fork 93
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
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 into
PowerShell:master
Choose a base branch
from
o-l-a-v:install-path-override
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
o-l-a-v
changed the title
Install-path-override
Idea for ability to optionally override default modules and scripts install path - Duscussion and contribution is welcome!
Jul 13, 2024
…ke path to returning standard paths shorter
…ke path to returning standard paths shorter
…werShell--PSResourceGet into install-path-override
@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 |
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
PSResourceGetInstallPathOverride
if present and use it instead of default paths.Set-PSResourceInstallPathOverride -Path <path> -Scope <CurrentUser|AllUsers>
.PSResourceGetInstallPathOverride
and add it toPSModulePath
if not already there.-WhatIf
Get-PSResourceGetInstallPathOverride
?Remove-PSResourceGetInstallPathOverride
?Get-PSResource
searches for all paths inPSModulePath
Get-PSResource
does not search in user context environment variablePSModulePath
#889Related issues / feature requests
%OneDriveCommercial%
if OneDrive for Business Known Folder Move (KFM) is enabled #627Get-PSResource
does not search in user context environment variablePSModulePath
#889PR Context
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.