Skip to content

UnrecognizedArgumentError in Azure Cloud Shell while parsing wildcard argument #16879

Open

Description

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

Describe the bug

Providing wildcard character as argument throws a strange error in Azure Cloud Shell (both powershell and bash shells).
This only happens in Cloud Shell. I'm not sure which CLI version introduced this regression, but we had a customer report this error recently in this github issue.

To Reproduce

az appconfig kv list -n test-appconfig-00 --key *
UnrecognizedArgumentError: unrecognized arguments: test.json
Try this: 'az appconfig kv list --label <test,prod,\0> --name '
Still stuck? Run 'az --help' to view all commands or go to 'https://aka.ms/cli_ref' to learn more

Commands that still parse wildcard as expected:

az appconfig kv list -n test-appconfig-00 --key *abc
[]

az appconfig kv list -n test-appconfig-00 --key abc*
[]

Workaround for parsing wildcard:

az appconfig kv list -n test-appconfig-00 --key "*"
[]

Expected behavior

Many AppConfig commands accept wildcard characters as input arguments. Parsing * without quotes should not throw any error.

Environment summary

az --version
azure-cli 2.18.0 *

core 2.18.0 *
telemetry 1.0.6

Extensions:
ai-examples 0.2.5
azure-cli-ml 1.20.0

Python location '/opt/az/bin/python3'
Extensions directory '/home/avani/.azure/cliextensions'
Extensions system directory '/opt/az/lib/python3.6/site-packages/azure-cli-extensions'

Python (Linux) 3.6.10 (default, Jan 15 2021, 09:54:35)
[GCC 8.3.0]

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions