Open bugrasan opened 6 months ago
Hi @bugrasan,
2.57.0 is not the latest Azure CLI(2.58.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.
Hi @bugrasan,
2.57.0 is not the latest Azure CLI(2.58.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.
same with v2.58:
$ az account list
Please run "az login" to access your accounts.
[]
$ echo $?
0
$ az --version
azure-cli 2.58.0
core 2.58.0
telemetry 1.1.0
Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2
Same for az containerapp show
, i.e. exit code 0 even on failure (when stderr is populated).
Describe the bug
The command
az account list
silently fails when not already logged in and the process returns exit code0
. This makes breaks Unix convention and makes it more difficult in automation to detect failure.Related command
az account list
compared withaz account show
that provides the correct exit code.Errors
no error - which is the problem
Issue script & Debug output
Expected behavior
exit code of
1
similar toaz account show
Environment Summary
Additional context
No response