PowerShell/PowerShellGetv2

Find-Module: Different behavior between local repository and Web server repository.

LaurentDardenne opened this issue · 0 comments

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

Created a local repository, copy a prerelease of a package there (example 'Pester 5.5.0-rc1').
Use a remote web server repository), copy a prerelease of a package there (example 'Pester 5.5.0-rc1').

Compare the output of the following command:
Find-Module -Name 'Pester' -Repository

Expected behavior

The behavior must be identical between the two types of repository or 
modify the documentation if this behavior is correct.

Actual behavior

If, for a module, the local repository contains only one package whose version is a prerelease, 
Find-Module returns this module in any case whether the -AllowPrerelease parameter is specified or not.

Error details

No error

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.19041.3031
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.3031}
BuildVersion                   10.0.19041.3031
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


--------
C:\temp> get-module

ModuleType Version    Name
---------- -------    ----
Manifest   3.1.0.0    Microsoft.PowerShell.Management
Manifest   3.1.0.0    Microsoft.PowerShell.Utility
Script     1.4.8.1    PackageManagement
Script     1.0.0      posh-git
Script     2.2.5      PowerShellGet
Script     2.2.6      PSReadline

Version

2.2.5

Visuals

image

Note :
Depending on the type of the queried repository, the type of the 'AdditionalMetadata.IsPrerelease' property is different:
image