az: error: unrecognized arguments: –query loginServer

I’m trying to deploy a test spring boot app using the Az Cli.
I’ve followed the steps to setup everything, but at the point of creating a docker registry:

export DOCKER_REGISTRY=$(az acr show --name acrTestProject3  --query loginServer --output tsv)

I’m getting this error

“az: error: unrecognized arguments: –query loginServer”

Source: StackOverflow