Skip to content

[Find-PsResource] Inconsistency when triggering a warning message and the actual contents of a registered repository #1379

Open

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

image

Activity

  1. LaurentDardenne commented on Aug 23, 2023

    @LaurentDardenne
    Author

    Case where the content of the repository matches the error message:

    unRegister-PSResourceRepository -name RepoTestV3
    $arrayOfHashtables = @{Name = 'psmodulecache'; Uri = 'https://nuget.cloudsmith.io/psmodulecache/test/v3/index.json'; Trusted = $true; Priority= 50 ;ApiVersion='v3'}
    Register-PSResourceRepository -Repository $arrayOfHashtables

    image

  2. SydneyhSmith commented on Aug 28, 2023

    @SydneyhSmith
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions