azure-cli
azure-cli copied to clipboard
Auto Upgrade ignores `--only-show-errors`
Describe the bug
If you have auto upgrade enabled (az config set auto-upgrade.enable=yes
), have an out of date Azure CLI and try to run the and run a command with --only-show-errors
, the auto upgrade will write warning messages when the CLI is out of date.
If I pass --only-show-errors
then I don't expect warnings to be shown.
Related command
Seems to be all commands
Errors
No error message - just unexpected warnings
Issue script & Debug output
az account get-access-token --query expiresOn --only-show-errors
output:
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Your current Azure CLI version is 2.58.0. Latest version available is 2.60.0.
Please check the release notes first: https://docs.microsoft.com/cli/azure/release-notes-azure-cli
Do you want to continue? (Y/n):
Expected behavior
The auto upgrade shouldn't have printed any warnings, nor prompt for me to upgrade since I explicitly told the command to only output errors (with --only-show-errors
).
Environment Summary
azure-cli 2.58.0 *
core 2.58.0 * telemetry 1.1.0
Extensions: resource-graph 2.1.0
Dependencies: msal 1.26.0 azure-mgmt-resource 23.1.0b2
Additional context
May be related to #28875.
Hi @afscrome,
2.58.0 is not the latest Azure CLI(2.60.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.