Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
617 stars 239 forks source link

Fixed default order of the identities #1286

Closed jikuja closed 1 year ago

jikuja commented 1 year ago

get_token_from_az_logins() method uses the wrong comparison when finding an active subscription from az login data. The code fails to insert active subscription as first identity without outputting any errors or warning.

This PR fixes comparison and active subscription is added into tenantsDict as first item.

Compare with get_default_subscription_info() in same file.

Please make sure the code is following contribution guidelines in CONTRIBUTING.md