anypackage / psresourceget

PSResourceGet (PowerShellGet) provider for AnyPackage.
https://anypackage.dev/docs/provider-catalog/psresourceget/about_PSResourceGet_Provider
MIT License
2 stars 1 forks source link

Install-Package writes error on non-existent package #18

Closed ThomasNieto closed 1 year ago

ThomasNieto commented 1 year ago

No error should be written by the provider when a package is not found.

Add -ErrorAction Ignore to Find-PSResource calls.

Install-Package -Name Docker.DockerDesktop -PassThru -Verbose
VERBOSE: Performing the operation "Install-Package" on target "Docker.DockerDesktop".
VERBOSE: Installing 'Docker.DockerDesktop' package.
VERBOSE: Calling 'PowerShellGet' provider.
Install-Package: Package 'Docker.DockerDesktop' with requested version range '(, )' could not be found in any trusted repositories
ThomasNieto commented 1 year ago

I'm not sure why but I can't reproduce this anymore.

Install-Package -Name Docker.DockerDesktop -PassThru -Verbose
VERBOSE: Performing the operation "Install-Package" on target "Docker.DockerDesktop".
VERBOSE: Installing 'Docker.DockerDesktop' package.
VERBOSE: Calling 'Chocolatey' provider.
VERBOSE: Calling 'PowerShellGet' provider.
VERBOSE: Calling 'Scoop' provider.
VERBOSE: Calling 'WinGet' provider.
Install-Package: Package not found. (Package 'Docker.DockerDesktop')