Open o-l-a-v opened 1 month ago
@anamnavi, @alerickson Have you had any time to check out this idea? Any thoughts? 🤔
Edit: It's probably better to use powershell.settings.json
for this, ref:
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 powershell.config.json
in my limited testing:
PR Summary
What
I'm experimenting with a way to override PSResourceGet install path for modules and scripts, suggested in my comment https://github.com/PowerShell/PSResourceGet/issues/1494#issuecomment-2225201194.
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
Related issues / feature requests
PR 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.