Character ```^``` missed in input parsing for az appconfig
See original GitHub issueDescribe the bug
When we run CLI command in powershell, ^
is missed in input argument. For example, if --input is “a^b”, then it becomes “ab”. This issue only happens in powershell. After some verifications, character is drop in CLI input pipeline before service team’s code can reach it.
To Reproduce
$mypass = ‘hello^test’ az appconfig kv set -n ‘resource-name’ --key ‘myKey’ --value $mypass --yes -y
Expected behavior All characters should be preserved as input.
Environment summary CLI version: 2.26.0 Env: Powershell
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
UnrecognizedArgumentError in Azure Cloud Shell while ...
Many AppConfig commands accept wildcard characters as input arguments. Parsing * without quotes should not throw any error.
Read more >Tips for using the Azure CLI successfully - Microsoft Learn
The az command fails because it is missing the required --location parameter. The conditional statement finds that $? is false and writes an ......
Read more >Infrastructure as Code - An intro - Part 2 - Using Azure CLI
The following tenants require Multi-Factor Authentication (MFA) Use 'az login –tenant TENANT_ID' to explicitly login to a tenant. The reason for ...
Read more >How can I sent an Azure app config value that contains an ...
I'm using Azure CLI to try to set an app config value to this URL: az appconfig ...
Read more >Manually create or edit the CloudWatch agent configuration file
Specifies the user-agent string that is used by the CloudWatch agent when it ... Allowed characters include a–z, A–Z, 0–9, '_' (underscore), '-'...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Caused by
In Command Prompt,
^
in such case is interpreted as the the Escape Character which as no meaning beforet
:See https://ss64.com/nt/syntax-esc.html
When calling
az.cmd
from PowerShell, please pay attention to PowerShell’s quoting rules: https://github.com/Azure/azure-cli/blob/dev/doc/quoting-issues-with-powershell.md.You may surround the value with double quotes:
Or prevent PowerShell from parsing quotes:
Or repeat
^
4 times:This causes the
az.cmd
script to receivehello^^test
, and it passeshello^test
topython.exe
.@yonzhan Can you help to redirect to CLI framework folks who work on cli in powershell? This issue is not limit to az appconfig but all other commands.