-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Milestone
Description
Steps to reproduce
# get-psrepository
Name InstallationPolicy SourceLocation
---- ------------------ --------------
PSGallery Untrusted https://www.powershellgallery.com/api/v2
BlahBlahPSModules Trusted https://artifactory.blahblah.com/api/nuget/psmodules-local
# find-module -Credential $cr1 -verbose -Name 'notreallyanamethatwillbefound' VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2'; IsTrusted = 'False'; IsRegistered = 'True'.
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2'; IsTrusted = 'False'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='notreallyanamethatwillbefound'' for ''.
VERBOSE: Total package yield:'0' for the specified package 'notreallyanamethatwillbefound'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://artifactory.blahblah.com/api/nuget/psmodules-local' and PackageManagementProvider is 'NuGet'.
WARNING: Unable to resolve package source 'https://artifactory.blahblah.com/api/nuget/psmodules-local'.
VERBOSE: Total package yield:'0' for the specified package 'notreallyanamethatwillbefound'.
PackageManagement\Find-Package : No match was found for the specified search criteria and module name 'notreallyanamethatwillbefound'. Try Get-PSRepository to see all available registered module repositories.
At C:\Users\my.name\Documents\PowerShell\Modules\PowerShellGet\2.2.1\PSModule.psm1:8871 char:9
+ PackageManagement\Find-Package @PSBoundParameters | Microsoft ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.PowerShel\u2026Cmdlets.FindPackage:FindPackage) [Find-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage
Expected behavior
My custom repository will be searched for the requested module. It is important to note that according to the Artifactory log, no requests are ever made to the server.
Actual behavior
My custom repository isn't searched for the requested module (because the package source couldn't be resolved, whatever that means).
Environment data
# $psversiontable
Name Value
---- -----
PSVersion 6.2.2
PSEdition Core
GitCommitId 6.2.2
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
# Get-Module -ListAvailable PowerShellGet,PackageManagement
Directory: C:\Users\my.name\Documents\PowerShell\Modules
ModuleType Version Name PSEdition ExportedCommands
---------- ------- ---- --------- ----------------
Script 1.4.4 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, G…
Script 2.2.1 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find…
Directory: C:\program files\powershell\6\Modules
ModuleType Version Name PSEdition ExportedCommands
---------- ------- ---- --------- ----------------
Script 1.3.2 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, G…
Script 2.1.3 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find…
# Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, …
PowerShellGet 2.2.1.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, In…
PowerShellGet 2.1.3.0
Outek, iesen, pcgeek86, briantist and henrivdr01