Skip to content

Argument passthrough -- stops working in PowerShell since 2.40.0 #24034

Description

@jiasli

Describe the bug
There is a regression in Azure Quantum CLI extension introduced by Azure CLI latest release (2.40.0).

The command below, which used to work with 2.39.0, is now complaining about "ERROR: unrecognized arguments: --submit-config-file".

> az quantum job submit --target-id echo-qci -- --submit-config-file .\SubmissionConfigFile.json
cli.knack.cli: Command arguments: ['quantum', 'job', 'submit', '--target-id', 'echo-qci', '--submit-config-file', '.\\SubmissionConfigFile.json', '--debug']

Our CLI extension passes through those arguments, which follow --, to invoke our executable underneath the CLI. With this regression, this argument pass through mechanism is not working any more.

az storage copy also supports -- notation (#20702) and it stops working:

> az storage copy -s source_file -d destination_container_url -- --block-size-mb=0.25 --check-length --debug
cli.knack.cli: Command arguments: ['storage', 'copy', '-s', 'source_file', '-d', 'destination_container_url', '--block-size-mb=0.25', '--check-length', '--debug']

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions