Open Trenly opened 1 year ago
I think this one ends up being chalked up to the implementation on the "msstore" REST source.
winget search --id Microsoft.Teams -s msstore --verbose-logs --open-logs
No package found matching input criteria.
WinGet-2023-02-14-16-27-50.008.log
winget search --name "Microsoft Teams" -s msstore --verbose-logs --open-logs
Name Id Version
--------------------------------------
Microsoft Teams XP8BT8DW290MPQ Unknown
WinGet-2023-02-14-16-29-40.703.log
winget search --id "Microsoft.Teams" --name "Microsoft Teams" -s msstore --verbose-logs --open-logs
Name Id Version
--------------------------------------
Microsoft Teams XP8BT8DW290MPQ Unknown
@denelon - while that may be true, I would expect that the applicability filters perform a "sanity check" after the results have been returned; Even though the msstore source returns the package, the results should be run through the ID applicability filter to ensure the intent is matched.
Essentially, when the results are aggregated, they should probably still be checked against the user intent.
Imagine for a moment it is a private restsource that is improperly implemented and always returns a list of all packages in the source. Users would not blame the source, they would blame the client; even after its been confirmed to be the rest source misbehaving, users would likely expect the CLI to be smart enough to double check the package applicability to their query just like it checks the installer applicability to their machine
I was just talking with the engineering team about this. We don't actually split the request into separate queries. It would mean implementing additional post processing logic in WinGet.
I don't necessarily like having to handle an incorrect implementation of the REST API, but I think for the sake of user experience, it may very well be worth doing.
Hmm. Interesting. Definitely a complex problem. I’m sure the team will decide on a path that is best
Brief description of your issue
When using both
--name
and--id
I would expect a specific package to be found. Multiple results are returned.Steps to reproduce
Run
winget show --name "Microsoft Teams" --id "Microsoft.Teams"
Expected behavior
Actual behavior
Environment