Find-WinGetPackage always results in $? being true #4861
Labels
Issue-Bug
It either shouldn't be doing this or needs an investigation.
PowerShell
Issue related to WinGet PowerShell Module or cmdlet
Brief description of your issue
When using
Find-WinGetPackage
, even when no packages are found, the result of$?
will always beTrue
Steps to reproduce
Expected behavior
If one or more packages is found,
$?
should be true. If no packages are found$?
should be false.This should match the behavior of
winget search
wherewinget search Google.Chrome; $?
returns true butwinget search asdfasdfasdfad; $?
returns falseActual behavior
$?
always returns true afterFind-WinGetPackage
Environment
The text was updated successfully, but these errors were encountered: