Skip to content
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 -Name * does not return anything on 1.0.5+ #1688

Open
3 tasks done
ThomasNieto opened this issue Aug 17, 2024 · 1 comment · May be fixed by #1706
Open
3 tasks done

Find-PSResource -Name * does not return anything on 1.0.5+ #1688

ThomasNieto opened this issue Aug 17, 2024 · 1 comment · May be fixed by #1706
Assignees
Labels

Comments

@ThomasNieto
Copy link
Contributor

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Find-PSResource -Name * does not return any results on 1.0.5+.

Expected behavior

All resources in a repository are returned

Actual behavior

No resources in a repository are returned

Error details

N/A

Environment data

1.0.5

Visuals

No response

@o-l-a-v
Copy link
Contributor

o-l-a-v commented Sep 18, 2024

Seems it errors because $filter gets added twice.

PS > Find-PSResource -Name '*' -Repository 'PSGallery' -Debug

DEBUG: In FindPSResource::ProcessResourceNameParameterSet()
DEBUG: Filtering package name(s) on wildcards
DEBUG: In FindHelper::FindByResourceName()
DEBUG: Parameters passed in >>> Name: '*'; ResourceType: 'None'; VersionRange: ''; NuGetVersion: ''; VersionType: 'NoVersion'; Version: ''; Prerelease: 'False'; Tag: ''; Repository: 'PSGallery'; IncludeDependencies 'False'
DEBUG: Searching through repository 'PSGallery'
DEBUG: In FindHelper::SearchByNames()
DEBUG: No version specified, package name is '*'
DEBUG: In V2ServerAPICalls::FindAll()
DEBUG: In V2ServerAPICalls::FindAllFromTypeEndPoint()
DEBUG: In V2ServerAPICalls::HttpRequestCall()
DEBUG: Request url is 'https://www.powershellgallery.com/api/v2/items/psscript/Search()?$filter=$filter=IsLatestVersion&$inlinecount=allpages&$skip=0&$top=6000&$orderby=Id+desc'
DEBUG: Response is empty
Find-PSResource: 'Response status code does not indicate success: 400 (Bad Request).' Request sent: 'https://www.powershellgallery.com/api/v2/items/psscript/Search()?$filter=$filter=IsLatestVersion&$inlinecount=allpages&$skip=0&$top=6000&$orderby=Id+desc'

PS >

If going to that URL in the browser:

<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code/>
<m:message xml:lang="en-US">URI or query string invalid. Syntax error at position 8 in '$filter=IsLatestVersion'.</m:message>
</m:error>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants