Skip to content

Install-PSressource Trims Version Number if Prerelease  #800

@SignalR-Dev

Description

@SignalR-Dev

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

Finding a Rssource works as expected ie.
`Find-PSResource -Repository $RepositoryName -Name netbox -Prerelease:$AllowPrerelease

Name Version Prerelease Repository Description


NetBox 2022.9.2.8 Prerelease BaGet AutoGenerated Netbox Module for Powershell…

But Once installed
Get-PSResource -Scope AllUsers -Name NetBox
Name Version Prerelease Repository Description


NetBox 2022.9.2 Prerelease BaGet AutoGenerated Netbox Module for Powershell…

The Revision is trimmed and in Metadata replaced by -1

Major Minor Build Revision


2022 9 2 8 <- Remote
2022 9 2 -1 <- local

Expected behavior

$Remote = Find-PSResource -Repository $RepositoryName -Name netbox -Prerelease:$AllowPrerelease
$local  =  Get-PSResource  -Scope AllUsers -Name NetBox

$remote.Version -eq $local.version #true

Actual behavior

$Remote = Find-PSResource -Repository $RepositoryName -Name netbox -Prerelease:$AllowPrerelease
$local  =  Get-PSResource  -Scope AllUsers -Name NetBox

$remote.Version -eq $local.version #false

Error details

No response

Environment data

Binary     3.0.16     beta16     PowerShellGet    #(not resolved in 17)    

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions