`Find-PSResource` Does Not Properly Evaluate/Compare Available Package Versions Against Specified Version
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con el punto de entrada Find-PSResource y reproduce los comandos de rangos de versiones mostrados en el issue para el módulo PSResourceGet. Compara los resultados de [6, ] y [10, ] con las versiones disponibles esperadas; se considera terminado cuando un rango que comienza en 6 incluye todas las versiones más recientes en el orden numérico correcto en los entornos de PowerShell indicados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Steps to reproduce
- Run a
Find-PSResourcecmdlet with-Versionparam specified that should show all versions from a specific version and above.
Find-PSResource VMware.PowerCLI -Version "[6, ]" - See that the output does not necessarily include all newer available versions (depending on the input version given).
Expected behavior
In this example scenario, the output should have produced lines for all versions of PowerCLI from v6.x up through v13.x which is the current. The old Find-Module cmdlet with -AllVersions param reflects this behavior:
PS > Find-Module -Name 'VMware.PowerCLI' -AllVersions
Version Name Repository Description
------- ---- ---------- -----------
13.3.0.24145081 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
13.2.1.22851661 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
13.2.0.22746353 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
13.1.0.21624340 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
13.0.0.20829139 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.7.0.20091289 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.6.0.19610541 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.5.0.19195797 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.4.1.18769701 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.4.0.18633274 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.3.0.17860403 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.2.0.17538434 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.1.0.17009493 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
12.0.0.15947286 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
11.5.0.14912921 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
11.4.0.14413515 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
11.3.0.13990089 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
11.2.0.12780525 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
11.2.0.12483598 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
11.1.0.11289667 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
11.0.0.10380590 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
10.2.0.9372002 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
10.1.1.8827524 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
10.1.0.8403314 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
10.0.0.7895300 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
6.5.4.7155375 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
6.5.3.6870460 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
6.5.2.6268016 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
6.5.1.5377412 VMware.PowerCLI PSGallery This Windows PowerShell module contain...
Actual behavior
Instead we only see lines for the v6.x versions.
PS > Find-PSResource VMware.PowerCLI -Version "[6, ]"
Name Version Prerelease Repository Description
---- ------- ---------- ---------- -----------
VMware.PowerCLI 6.5.4.7155375 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 6.5.3.6870460 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 6.5.2.6268016 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 6.5.1.5377412 PSGallery This Windows PowerShell module contains VMware.PowerCLI
We could run the same command again but with the value 10 inside the version string this time, instead of 6, to confirm that there are in fact newer versions available.
PS > Find-PSResource VMware.PowerCLI -Version "[10, ]"
Name Version Prerelease Repository Description
---- ------- ---------- ---------- -----------
VMware.PowerCLI 13.3.0.24145081 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 13.2.1.22851661 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 13.2.0.22746353 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 13.1.0.21624340 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 13.0.0.20829139 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.7.0.20091289 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.6.0.19610541 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.5.0.19195797 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.4.1.18769701 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.4.0.18633274 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.3.0.17860403 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.2.0.17538434 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.1.0.17009493 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 12.0.0.15947286 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 11.5.0.14912921 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 11.4.0.14413515 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 11.3.0.13990089 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 11.2.0.12780525 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 11.2.0.12483598 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 11.1.0.11289667 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 11.0.0.10380590 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 10.2.0.9372002 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 10.1.1.8827524 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 10.1.0.8403314 PSGallery This Windows PowerShell module contains VMware.PowerCLI
VMware.PowerCLI 10.0.0.7895300 PSGallery This Windows PowerShell module contains VMware.PowerCLI
Error details
I'm assuming this has something to do with it not properly interpreting or "sorting" the version field. It appears to be sorting in lexicographical order instead of numerical order (so it thinks 10.x is lower than 6.x since 10 starts with a 1) - that's just a guess based on the behavior I've seen but I could be wrong.
Also I would add that the behavior has been reproduced on both WindowsPowerShell (v5.1) as well as PowerShell (v7).
Please let me know if any additional info is needed.
Thanks!
Environment data
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 1.1.0 Microsoft.PowerShell.PSResourceGet {Compress-PSResource, Find-PSResource, Get-InstalledPSReso...
Key : PSVersion
Value : 5.1.19041.5369
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.19041.5369
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
Visuals
- Lenguaje dominante
- C#
- Estrellas
- 577
- Forks
- 114
- Merge medio
- 23 h 17 min
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PowerShell/PSResourceGet
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectoryAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PowerShell/PSResourceGet#2056 ·
Los mantenedores suelen responder en 1 día
-
feature_request
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PowerShell/PSResourceGet#2013 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Needs-Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
PowerShell/PSResourceGet#2060 ·
Los mantenedores suelen responder en 1 día
-
Needs-Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
PowerShell/PSResourceGet#2059 ·
Los mantenedores suelen responder en 1 día
-
Use GitHub app token to authenticate to GitHub resourcesPosiblemente ocupada @adityapatwardhan la tomó hace 15 días. Abiertofeature_request Needs-Triage
PowerShell/PSResourceGet#2057 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de PowerShell/PSResourceGet
Issues similares
-
S: Untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
space-wizards/space-station-14#46357 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
MicrosoftLearning/PL-400_Microsoft-Power-Platform-Developer#231 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
joinrpg/joinrpg-net#5313 ·
Los mantenedores suelen responder en 1 día
-
[12.x] FixIncorrectOwnerIdRelationships can delete legitimate library roots when UserView shares the same pathPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día