Argument parser truncates closing parenthesis from string when running on windows in Powershell
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
String parser deletes a closing parenthesis from the string.
I've seen this elsewhere, so I know this is not isolated only to variable creation, but I can repeatedly reproduce it while creating or updating a variable in a variable group.
To reproduce:
0. using windows powershell 7.x
1. create a variable group. get its id
2. run `az pipelines variable-group variable create --group-id --name "myvar" --org --project --value 'thisVarEndsInaParenthesis)'`
4. observe output
```
{
"myvar": {
"isSecret": null,
"value": "thisVarEndsInaParenthsis"
}
}
````
Notice the missing parenthesis at the end of the var value.
5. Navigate to var group in the browser and observe the same missing parenthesis there as well.
### Related command
az pipelines variable-group variable create
### Errors
none
### Issue script & Debug output
az pipelines variable-group variable create --group-id --name "myvar" --org --project --secret false --value 'thisVarEndsInaParenthsis)' --debug
--debug was unexpected at this time.
C:\> "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\\..\python.exe" -IBm azure.cli pipelines variable-group variable create --group-id --name myvar --org --project --secret false --value thisVarEndsInaParenthsis) --debug
### Expected behavior
Variable is created with its value having a parenthesis at the end.
### Environment Summary
{
"azure-cli": "2.54.0",
"azure-cli-core": "2.54.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"azure-devops": "0.26.0",
"containerapp": "0.3.44"
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.