Skip to content

Exposing the output of az --version in JSON and other parsable formats. #27457

@nascarsayan

Description

@nascarsayan

Related command

az --version

Is your feature request related to a problem? Please describe.

az --version outputs several valuable information apart from the current versions of installed azure-cli modules and extensions. This includes:

  1. Which code CLI modules are not up-to-date (azure-cli , azure-cli-core, azure-cli-telemetry).
  2. Path to the underlying python used by az. The mode of installation of this python.
  3. Path to the extensions directory.

All this information is not available in a code-parsable format. We currently need to do string parsing which can be flaky.

Describe the solution you'd like

az --version -o json --query '<> can be used to query a specific property of the az installation. We can decide on the schema of the exposed property.

Describe alternatives you've considered

Currently, I need to parse the string output, using regex, etc. to get the python installation location, and also to check if upgrade is available.

Additional context

Metadata

Metadata

Assignees

Labels

Azure CLI TeamThe command of the issue is owned by Azure CLI teamCoreCLI core infrastructureOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.Upgradeaz upgradefeature-requestneeds-author-feedbackMore information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions