Closed raandree closed 4 years ago
Hey @raandree
How did you import the provider? Did you run Import-Module Chocolatier
or Import-PackageProvider Chocolatier
?
If I run Import-Module
I get the output you're seeing, but the provider should be imported using Import-PackageProvider
or by explicitly specifying the provider name in the PackageManagement cmdlet.
For example:
Import-PackageProvider Chocolatier
Find-Package -Name Putty
# or
Find-Package -Name Putty -ProviderName Chocolatier
Please see https://github.com/ethanbergstrom/Chocolatier#install-chocolatier and https://github.com/ethanbergstrom/Chocolatier#search-for-a-package for additional examples, and let me know if you have any additional questions.
Do you use the Find-Package function provided by the Chocolatier module or is this for internal use only?
The Find-Package
cmdlet called by users directly should be provided by the PackageManagement
module, not the underlying provider module.
Provider modules should not be imported directly into the PowerShell session.
With a fresh PowerShell session, please use Import-PackageProvider Chocolatier
, not Import-Module Chocolatier
.
Please see https://docs.microsoft.com/en-us/powershell/module/packagemanagement/Import-PackageProvider for more information.
Thanks, this is then almost a duplicate to #5.
Find-Package did not work. As one can't specify the source, it is unclear where the cmdlet goes to.