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

[Shell] Azure CLI receives corrupted arguments in PowerShell #15529

Open
jiasli opened this issue Oct 15, 2020 · 2 comments
Open

[Shell] Azure CLI receives corrupted arguments in PowerShell #15529

jiasli opened this issue Oct 15, 2020 · 2 comments
Assignees
Labels
common issue Service Attention This issue is responsible by Azure service team. Shell - PowerShell
Milestone

Comments

@jiasli
Copy link
Member

jiasli commented Oct 15, 2020

Describe the bug

When invoking az in PowerShell, due to the known issue of PowerShell PowerShell/PowerShell#1995, arguments passed to Azure CLI may get corrupted. For example, literal double quotes (") are lost:

# PowerShell
> az '{"signInAudience":"AzureADAndMicrosoftAccounts"}' --debug
Command arguments: ['{signInAudience:AzureADAndMicrosoftAccounts}', '--debug']

This contradicts the behavior of Bash:

# Bash
$ az '{"signInAudience":"AzureADAndMicrosoftAccounts"}' --debug
Command arguments: ['{"signInAudience":"AzureADAndMicrosoftAccounts"}', '--debug']

Impact

This is mainly affecting

Workaround

Until this issue is fixed by PowerShell, arguments with special characters (", ,, &...) need to be escaped twice, one for CMD, one for PowerShell.

More info: Quoting issues with PowerShell

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Oct 15, 2020
@jiasli jiasli self-assigned this Oct 15, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Oct 15, 2020
@jiasli jiasli added this to the Backlog milestone Oct 15, 2020
@jiasli
Copy link
Member Author

jiasli commented Oct 15, 2020

All similar issues are categorized under the Shell - PowerShell label. By now, received #7054, #8070, #8630, #8827, #9047, #9228, #9742, #10370, #10997, #11003, #1100, #11641, #11668, #12970, #13152, #13208, #13340, #13882, #15214, #15512.

@yonzhan yonzhan added the Service Attention This issue is responsible by Azure service team. label Oct 15, 2020
@bb-froggy
Copy link

The PowerShell issue seems to be fixed in PowerShell 7.3 : PowerShell/PowerShell#1995 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common issue Service Attention This issue is responsible by Azure service team. Shell - PowerShell
Projects
None yet
Development

No branches or pull requests

3 participants