PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Install-PSressource Trims Version Number if Prerelease

Open SignalR-Dev opened this issue 3 years ago • 0 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest released version
  • [X] 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

SignalR-Dev avatar Sep 16 '22 13:09 SignalR-Dev