`az upgrade` shows there is an update available when version check fails
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
If there is no internet connection or if the computer cannot connect to https://raw.githubusercontent.com/Azure/azure-cli/main/src/azure-cli/setup.py, `az upgrade` thinks there is an update available called `None` and asks the user whether to continue:
```
$ az upgrade
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Your current Azure CLI version is 2.28.0. Latest version available is None.
Please check the release notes first: https://docs.microsoft.com/cli/azure/release-notes-azure-cli
Do you want to continue? (Y/n):
```
This behavior is incorrect as `az upgrade` should report version check failure, instead of comparing the current version 2.28.0 with `None`.
Contributor guide
Assessment
This issue has not been assessed yet.