az login and az account set fail with HTML-encoded characters and subscription not found
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
When using Azure CLI on macOS with zsh, commands like `az account set` fail due to HTML-encoded characters like `<` and `>` being interpreted literally.
Also, even after successful login and selecting the correct subscription, Terraform fails to detect the subscription ID, and Azure CLI shows:
### Related command
az login
az account list
az account set --subscription ""
### Errors
zsh: no such file or directory: SUBSCRIPTION_ID
The subscription of '' doesn't exist in cloud 'AzureCloud'.
zsh: missing end of string
### Issue script & Debug output
az login --debug
az account set --subscription "" --debug
### Expected behavior
Azure CLI should correctly parse and set the subscription ID. HTML-encoded characters should not appear in the terminal. Terraform should be able to detect the subscription ID from the Azure CLI session.
### Environment Summary
az --version
### Additional context
Using macOS with zsh. Commands copied from web sources seem to include HTML-encoded characters like `<` instead of `<`, which causes parsing issues.
Contributor guide
Assessment
This issue has not been assessed yet.