azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

[ACR] Repository list command doesn't support table output

Open lostintangent opened this issue 10 years ago • 3 comments

UPDATE: I just noticed that the az acr repository show-tags command has the same behavior as described below.


Running acr repository list, while the CLI is configured to use table output (which is the new default?), outputs the following error:

Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.

If I append --query "repositories", then the table output will work, so I have to at least give the CLI props for the nice error message :) However, it's non-ideal to need to view the JSON output of the command, in order to understand the schema, and then add a --query flag in order to "pluck" the repositories list out of the returned object.

Maybe I'm doing something wrong, but I've not encountered another list command in the CLI that didn't naturally support table output, so it would be cool if acr repository list did as well.

lostintangent avatar Oct 22 '16 23:10 lostintangent

/cc @skkestrel

sajayantony avatar Nov 04 '16 00:11 sajayantony

I tried the following command:

(env) C:\Users\t-kezh\Documents\azure-cli>az acr repository list --name kevinregistry3 -o table
Result
-----------
hello-world

And:

(env) C:\Users\t-kezh\Documents\azure-cli>az acr repository show-tags -o table --name kevinregistry3 --repository hello-world
Result
--------
latest

Does this issue still persist for you with the latest version?

skkestrel avatar Nov 04 '16 00:11 skkestrel

This has been fixed as part of this commit https://github.com/Azure/azure-cli/pull/1198/commits/de8223f52b1dc28a4076831e6162afc63feb8774 Please close.

djyou avatar Nov 08 '16 05:11 djyou