Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jiasli opened this issue Sep 28, 2022 · 5 comments
Closed

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

jiasli opened this issue Sep 28, 2022 · 5 comments
Assignees
Labels
Auto-Assign Auto assign by bot feature-request Storage az storage
Milestone

Comments

@jiasli
Copy link
Member

jiasli commented Sep 28, 2022

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']
@ghost ghost added the Storage az storage label Sep 28, 2022
@ghost ghost added this to the Backlog milestone Sep 28, 2022
@ghost ghost assigned evelyn-ys Sep 28, 2022
@ghost ghost added the Auto-Assign Auto assign by bot label Sep 28, 2022
@jiasli
Copy link
Member Author

jiasli commented Sep 28, 2022

Tested with a simple test.ps1:

echo $args

Apparently, -- is not included in $args by PowerShell:

> ./test.ps1 a -- b
a
b

@jiasli jiasli changed the title Argument pass through -- stops working in PowerShell since 2.40.0 Argument passthrough -- stops working in PowerShell since 2.40.0 Sep 28, 2022
@yonzhan yonzhan added the CXP Attention This issue is handled by CXP team. label Sep 28, 2022
@ghost
Copy link

ghost commented Sep 28, 2022

Thank you for your feedback. This has been routed to the support team for assistance.

@navba-MSFT navba-MSFT removed the CXP Attention This issue is handled by CXP team. label Sep 28, 2022
@navba-MSFT
Copy link
Contributor

Removing CXP attention label since this was created internally by the CLI team

@shenyingjun
Copy link

@yonzhan / @jiasli Has this issue been fixed yet?

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 27, 2022

This issue should be fixed already, please verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot feature-request Storage az storage
Projects
None yet
Development

No branches or pull requests

5 participants