Skip to content

Update-PSResource fails to upgrade same-version prerelease -> full release #1953

@sean-r-williams

Description

@sean-r-williams

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

  • Find a package where:
    • A prerelease exists
    • A full release was minted with the same version
    • The prerelease and full release (minus prerelease suffix) are the same
      For example, JiraPS has 2.15.0 as latest, but previously had 2.15.0-alpha1.
  • Install the prerelease.
    (I'm explicitly pinning a version here, but pretend that I didn't do that)
    Install-PSResource JiraPS -Version 2.15.0-alpha1 -Prerelease
  • Try to upgrade the prerelease to a full-release:
    Update-PSResource JiraPS -Verbose -Debug
  • Observe that:
    • No update is installed
    • PSRG emits the following log line:
      VERBOSE: Installed package JiraPS 2.15.0 is already up to date.
      
    • Get-Module -ListAvailable shows no changes to installed modules

Expected behavior

Package is updated

Actual behavior

Package is not updated

Error details

No error

Environment data

PS>  Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable | ft

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     1.1.1      Microsoft.PowerShell.PSResourceGet  {Compress-PSResource, Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository...}



Name                           Value
----                           -----
PSVersion                      5.1.19041.6456
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.6456
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

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