Skip to content

[0.9.0-rc1] Install-PSResource install latest prerelease even without '-Prerelease'. Repository: GitLab #1406

Open
@Kj3l

Description

@Kj3l

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

These packages has been published using 'Publish-PSResource' on a GitLab package registry.

  • MyModule version '1.0.0' ( last stable )
  • MyModule version '1.1.0-dev' ( with prerelease property in manifest )
Install-PSResource 'MyModule'

It will install the prerelease version (1.1.0-dev) in the last stable version folder (1.0.0), which cause the module impossible to import (version does not match).

Other test works fine:

Install-PSResource 'MyModule' -Version '1.0.0'

Install version 1.0.0 correctly.

Install-PSResource 'MyModule' -Prerelease

Install version 1.1.0-dev correctly.

Expected behavior

'MyModule' version *1.0.0* is installed in version folder : "..PowerShell\Modules\MyModule\1.0.0\"

Actual behavior

'MyModule' version *1.1.0-dev* is installed in version folder : "..PowerShell\Modules\MyModule\1.0.0\"

Error details

VERBOSE: Skipping the Version folder 1.0.0 under Module C:\..\PowerShell\Modules\MyModule as it does not have a valid module manifest file.
Import-Module: The specified module 'C:\..\PowerShell\Modules\MyModule \' was not loaded because no valid module file was found in any module directory.

Environment data

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     0.9.0      rc1        Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}

Key   : PSVersion
Value : 7.3.4
Name  : PSVersion


Key   : PSEdition
Value : Core
Name  : PSEdition


Key   : GitCommitId
Value : 7.3.4
Name  : GitCommitId


Key   : OS
Value : Microsoft Windows 10.0.19045
Name  : OS


Key   : Platform
Value : Win32NT
Name  : Platform


Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0…}
Name  : PSCompatibleVersions


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

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