Skip to content

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

@jiasli

Description

@jiasli

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions