PowerShell / PowerShell/PSResourceGet
[Find-PsResource] Inconsistency when triggering a warning message and the actual contents of a registered repository
Open
Nobody has claimed this yet.
Area-Find
Issue-Bug
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
Inconsistency when triggering a warning message and the actual contents of a repository.
$arrayOfHashtables = @{Name = 'RepoTestV3'; Uri = 'https://nuget.cloudsmith.io/repopsresourceget/test/v3/index.json'; Trusted = $true; Priority= 50 ;ApiVersion='v3'}
Register-PSResourceRepository -Repository $arrayOfHashtables
#'string' exist in PsGallery
Find-psresource String -IncludeDependencies
Expected behavior
No warning if a repository with Apiversion equal to 'V3' do not contains the requested module.
Actual behavior
A warning message is displayed when the repository implicitly concerned does not contain the requested module.
Error details
no error
Environment data
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 0.5.24 Microsoft.PowerShell.PSResourceGet {Find-PSResource, Get-InstalledPSResource, Get-PSResourceR...
Key : PSVersion
Value : 5.1.19041.3031
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.3031}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.19041.3031
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
Visuals
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported Register-PSResourceRepository and Find-PSResource reproduction with the V3 Cloudsmith repository and inspect the Find-PSResource entry point and repository-search warning path. Done means the command does not warn when the V3 repository lacks the requested resource, while still finding String in PSGallery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100