PSResourceGet
PSResourceGet copied to clipboard
PSResourceGet exports the $PSGetPath variable but never sets the value
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues.
Steps to reproduce
In a new session import PSResourceGet but don't import PowerShellGet v2. Examine the value of $PSGetPath
.
Expected behavior
PS> Get-Variable PSGetPath -ValueOnly
AllUsersModules : C:\Program Files\PowerShell\Modules
AllUsersScripts : C:\Program Files\PowerShell\Scripts
CurrentUserModules : C:\Users\sewhee\Documents\PowerShell\Modules
CurrentUserScripts : C:\Users\sewhee\Documents\PowerShell\Scripts
Actual behavior
PS> Get-Variable PSGetPath -ValueOnly
Get-Variable: Cannot find a variable with the name 'PSGetPath'.
Error details
No error.
The variable $PSGetPath
was added to PowerShellGet v2 in https://github.com/PowerShell/PowerShellGetv2/pull/486. The variable is never used by the modules, it is provided to give users information about the location of the Modules
and Scripts
folder for each scope.
PSResourceGet exports the variable in the module manifest, but nowhere in code does it set the value.
Environment data
PS> gmo -list Microsoft.PowerShell.PSResourceGet
Directory: C:\Users\sewhee\Documents\PowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 1.0.2 Microsoft.PowerShell.PSResourceGet Core,Desk {Find-PSResource, Get-InstalledPSResour…
Binary 1.0.0 Microsoft.PowerShell.PSResourceGet Core,Desk {Find-PSResource, Get-InstalledPSResour…
Visuals
No response
it seems that there is no documentation of this variable...