PowerShell / PowerShell/PSResourceGet

`Save-PSResource` fails when targeting Artifactory with `-Version` (`NormalizedVersion` issue)

Aperta
#1,689 0 commenti 1 reazione 1 assegnatario Vedi su GitHub

@alerickson ci sta già lavorando.

Dal 27/8/2024.

Area-Save Needs-Triage
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
  1. Attach PSResourceGet to Artifactory repository
  2. Publish module to repository with Publish-PSResource
  3. Save the published module with Save-PSResource, specifying the version of the module with -Version
Expected behavior
PS> Save-PSResource -Name MyModule -Version 0.10.2
PS> # No error
Actual behavior
PS> Save-PSResource -Name MyModule -Version 0.10.2
Save-PSResource: Package(s) 'MyModule' could not be installed from repository 'Artifactory'.
PS>
Error details
N/A
Environment data
ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.0.5                 Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}


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

Running with -Verbose suggests that PSRG is using NormalizedVersion in $filter on a call to FindPackagesById(). Because Artifactory doesn't calculate this property for packages hosted on the service itself, the call returns no results and Save-PSResource fails.

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.