-
Notifications
You must be signed in to change notification settings - Fork 94
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
Find-PSResource -Repository 'PSGallery'
with NuGet version range returns no versions
#1630
Comments
Find-PSResource
with NuGet version range returns no versionsFind-PSResource -Repository 'PSGallery'
with NuGet version range returns no versions
@kilasuit Somehow your PowerShell command gives results, but
Which gives a rather strange URI if: "https://www.powershellgallery.com/api/v2/FindPackagesById()?id=%27Az%27&$orderby=NormalizedVersion%20desc&$inlinecount=allpages&$skip=0&$filter=IsPrerelease%20eq%20false%20and%20Id%20eq%20%27Az%27%20and%20NormalizedVersion%20gt%20%279.0.0%27%20and%20NormalizedVersion%20lt%20%2710.0.0" | clip Gives
Which gives a result in the browser. But |
@o-l-a-v thanks for creating this issue, we're aware of this being an issue due to a version comparison bug. We have this in our backlog |
Prerequisites
Steps to reproduce
Find-PSResource -Repository 'PSGallery' -Name 'Az' -Version '(9,10)'
returns nothing.If using
-Debug
we can se that the API request looks like below, which to me looks fine.https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Az'&$orderby=NormalizedVersion desc&$inlinecount=allpages&$skip=0&$filter=IsPrerelease eq false and Id eq 'Az' and NormalizedVersion gt '9.0.0' and NormalizedVersion lt '10.0.0'
I think this is a problem with the PowerShell Gallery API. It works with NuGet v3 API shim pwsh.gallery like so:
Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: