PowerShell / PowerShell/PSResourceGet
PSResourceInfo object does not properly sort versions
@anamnavi arbeitet bereits daran.
Seit 15.11.2021.
- Vorherrschende Sprache
- C#
- Sterne
- 576
- Forks
- 114
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
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
I should be able to sort resources by their version but this does not work as expected. This does not work due to PowerShellGet 3.0.11-beta splitting up semantic versioning into two different properties Version [System.Version] and PrereleaseLabel [String] on the PSResourceInfo type.
PowerShellGet 3.0.11-beta already takes a dependency on Nuget.Versioning.dll which contains [NuGet.Versioning.NuGetVersion] type that can handle traditional [Version] as well as [SemanticVersion].
Related issue https://github.com/PowerShell/PowerShell/issues/2983, https://github.com/PowerShell/PowerShellGet/issues/83
cc: @jaykul
Expected behavior
Should be able to properly sort resources by version.
Actual behavior
Sorting does not take into account semantic versioning.
Error details
No response
Environment data
PS C:\> Get-Module -Name PowerShellGet
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 3.0.11 beta PowerShellGet {Find-PSResource, Get-InstalledPSResource, Get-PS…
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 7.2.0-preview.8
PSEdition Core
GitCommitId 7.2.0-preview.8
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.