ethanbergstrom / winget

PackageManagement (OneGet) package provider for use with Windows Package Manager (winget)
MIT License
46 stars 1 forks source link

Find-Package does only exact searchs #7

Closed Lockszmith-GH closed 2 years ago

Lockszmith-GH commented 2 years ago
cobalt\Find-WinGetPackage 'vlc'

returns the package VideoLAN.VLC

while

Find-Package -ProviderName WinGet -Name 'vlc'

returns an error.

It seems that ~3 months ago it was setup with the -Exact switch.

Any particular reason for that? Can this be removed, or at least provided as a choice?

ethanbergstrom commented 2 years ago

Hey @Lockszmith-GH

The 'exact' behavior on by default dramatically simplifies WinGet's complicated and ambiguous results that come from the multitude of ways it searches for a package, which makes it more conducive to automation (the Install-Package cmdlet actually calls Find-Package cmdlet behind the scenes to return a fast package reference string).

If you're looking for something that most closely reflects the behavior of winget CLI, I would recommend using Cobalt, whereas the WinGet package provider is very opinionated.

Lockszmith-GH commented 2 years ago

Thank you for the quick response.

Since Cobalt is so tightly bound, I see your point.

It would make it easier to find the information if Cobalt would be linked in the README.md (it's not mentioned at all)

In anyway, thanks for explaining.