Skip to content

az CLI stuck in extension installation loop #17696

@toddysm

Description

@toddysm

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
Typing the following command puts the CLI in continuous loop:

az account -s "<SUB-ID>"

I understand this is invalid command but it seems it spins off multiple processes in a recursion.

To Reproduce

In an Ubuntu 20.04 Terminal (WSL) type the above command with a valid subscription id.

Expected behavior

Ideally replying with invalid command error. Or installs the extension and exits

Environment summary

Ubuntu 20.04 in WSL

az --version
azure-cli                         2.20.0 *

core                              2.20.0 *
telemetry                          1.0.6

Extensions:
account                            0.2.1
azure-iot                         0.10.8
storage-preview                   0.2.10
subscription                       0.1.4

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\XXXXXX\.azure\cliextensions'

Python (Windows) 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)]

Additional context

Here is the actual behavior:

$ az account -s "XXXXXXXX"
The command requires the latest version of one of the following extensions. You need to pick one to install:
 [1] account
 [2] subscription
Please enter a choice [Default choice(1)]:
The command requires the extension account. It will be installed first.
The installed extension 'account' is experimental and not covered by customer support. Please use with discretion.
The command requires the latest version of one of the following extensions. You need to pick one to install:
 [1] account
 [2] subscription
Please enter a choice [Default choice(1)]: 2
The command requires the extension subscription. It will be installed first.
The installed extension 'subscription' is in preview.
The command requires the latest version of one of the following extensions. You need to pick one to install:
 [1] account
 [2] subscription
Please enter a choice [Default choice(1)]:
The command requires the extension account. It will be installed first.
Extension 'account' 0.2.1 is already installed.
It will be updated if available.
No updates available for 'account'. Use --debug for more information.
The command requires the latest version of one of the following extensions. You need to pick one to install:
 [1] subscription
 [2] account
Please enter a choice [Default choice(1)]: 2
The command requires the extension account. It will be installed first.
Extension 'account' 0.2.1 is already installed.
It will be updated if available.
No updates available for 'account'. Use --debug for more information.
The command requires the latest version of one of the following extensions. You need to pick one to install:
 [1] account
 [2] subscription
Please enter a choice [Default choice(1)]: Terminate batch job (Y/N)? Y
Terminate batch job (Y/N)? Y
Terminate batch job (Y/N)? Y
Terminate batch job (Y/N)? Y
$

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions