Confused by several aspects #1471
Unanswered
William Kempf (wekempf)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I don't want to create issues if it's just my understanding that's very wrong, but there's several aspects of this module that are confusing me.
PSResourceInfo has a useful Type member, but it's only values are Module, Script and None, despite supporting NuGet packages. If you
Install-PSResourceand provide a NuGet package, then doGet-InstalledPSResourceyou'll get back that package, but the Type is None. That doesn't really make much sense to me.Save-PSResource PSFuzzyMenu -Path .used to save a script fails.Frankly, the error is pure nonesense to anyone that doesn't understand the internals of this module, so at best the error needs to be changed. But, based on what it said I stumbled upon
Save-PSResource PSFuzzyMenu -Path . -IncludeXmlwhich works, but creates aPSFuzzyMenu_InstalledScriptInfo.xmlalongside the script. That might make sense if I were "installing" the script, but I'm not. I'm "saving" the script, and don't want anything but the script saved to the location I specified.Making assumptions here, this leads to several other questions. Why would metadata about saved resources be kept beside the resource, rather than in some global location? That seems fragile, when paths can be changed? Why is this XML file used for scripts, but not packages or modules? Why is there an
-IncludeXmlflag that only applies to scripts and must be included in that case?Get-InstalledPSResourcewith the-Pathparameter seems like it would be for finding "saved", rather than "installed" resources. And indeed, it finds packages "saved" to the path. However, it doesn't find modules or scripts "saved" there. Which causes further confusion with the-IncludeXmlparameter.I understand I'm in an unusual scenario (I'm trying to save and use resources "locally", instead of installing them globally) but all of the above behaviors are extremely confusing.
All reactions