Azure / Azure/azure-cli

`az upgrade` shows there is an update available when version check fails

Open
#19,821 1 comment 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad feature-request Upgrade
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.