Skip to content

Parameters with spaces are split into separate arguments by the arg parser (knack?) even when quoted for bash #25327

@jxn

Description

@jxn

This is autogenerated. Please review and update as needed.

Describe the bug

I have a couple of examples of this, but the latest is the using the --team parameter in the az boards iteration teams list command. Instead of taking the quoted arg to interpret it as the property value, if the value contains a space, only the first word is used as the property value, and subsequent words are interpreted as extra args.

Command Name
az boards iteration team list --team "MY TEAM NAME WITH SPACES" --timeframe current --debug

debug snippet:

cli.knack.cli: Command arguments: ['boards', 'iteration', 'team', 'list', '--team', 'MY', 'TEAM', 'NAME', 'WITH', 'SPACES', '--timeframe', 'current', '--debug']

Errors:

unrecognized arguments: TEAM NAME WITH SPACES

(the command thinks I passed --team MY, as if I had not properly quoted the parameter value argument)

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az boards iteration team list --team 'MY TEAM WITH A SPACE IN THE NAME' --timeframe current --org=MyOrg --project=MyProject

Expected Behavior

az should interpret the value of --team as "MY TEAM WITH A SPACE IN THE NAME", and pass that encoded value to the api.

Environment Summary

Linux-5.19.0-29-generic-x86_64-with-glibc2.36, Ubuntu 22.10
Python 3.10.7
Installer: PIP

azure-cli 2.44.1

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Customer UsageDevOpsService AttentionThis issue is responsible by Azure service team.act-platform-engineering-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions