Skip to content

Use version comparison function rather than string compare in PS #5323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025

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