Skip to content
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

Fix Azure CLI version comparison bug #11826

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0x-art
Copy link

@0x-art 0x-art commented Feb 18, 2025

Change(s):

  • This commit swaps the arguments to verlte "$azver" "2.33.1" so that the function correctly returns true only when the installed version is less than or equal to 2.33.1

Reason for Change(s):

  • The scripts currently check for an outdated Azure CLI version by calling verlte "2.33.1" "$azver", which incorrectly evaluates newer versions (e.g., 2.38.2) as outdated due to reversed argument order.
  • This fix prevents unnecessary removal and reinstallation of the Azure CLI.

The script currently checks for an outdated Azure CLI version by calling
`verlte "2.33.1" "$azver"`, which incorrectly evaluates newer versions (e.g.,
2.38.2) as outdated due to reversed argument order. This commit swaps the
arguments to `verlte "$azver" "2.33.1"` so that the function correctly returns
true only when the installed version is less than or equal to 2.33.1.

This fix prevents unnecessary removal and reinstallation of the Azure CLI.
@0x-art 0x-art requested review from a team as code owners February 18, 2025 00:52
@0x-art
Copy link
Author

0x-art commented Feb 18, 2025

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants