KEMBAR78
Use version comparison function rather than string compare in PS by JohnMcPMS · Pull Request #5323 · microsoft/winget-cli · GitHub
Skip to content

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Mar 25, 2025

Change

Swap the version finding code in the PowerShell module from using a direct string comparison to using the CompareToVersion function. This enables non-exact version matching, such as "1 == 1.0.0".

Validation

Adds a test with a short version to validate the change.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner March 25, 2025 18:19
@JohnMcPMS JohnMcPMS merged commit c534f15 into microsoft:master Mar 25, 2025
9 checks passed
@JohnMcPMS JohnMcPMS deleted the ps-version-compare branch March 25, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants