PowerShell / PowerShell/PSResourceGet

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

Aperta
#1,406 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Area-PSRepository New-Repo-Request
Lingua principale
C#
Stelle
576
Fork
114
Merge medio
1g 2h
PR unite (30g)
7

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il problema tramite Install-PSResource rispetto al registro dei pacchetti GitLab, confrontando il comando predefinito con -Version e -Prerelease. Traccia da quel punto di ingresso la gestione dell'installazione e delle cartelle delle versioni; il lavoro è completato quando l'installazione predefinita seleziona 1.0.0 e lo colloca nella cartella 1.0.0 corrispondente, mentre -Prerelease continua a selezionare 1.1.0-dev.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
gitlab, powershell
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.