Azure / Azure/azure-devops-cli-extension
[Bug] "Failed to load python executable" when setting variable-group variable when value contains certain patterns
- Dominant language
- Python
- Stars
- 682
- Forks
- 278
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
**Describe the bug**
When I use Azure CLI from PowerShell, I am receiving a "Failed to load python executable" error when I attempt to create or update a variable group variable when the value of the variable contains a "-" (dash) character and ends with ")" (closing paren).
Note that this only happens when I run from PowerShell. When I run from CMD it works without error.
**To Reproduce**
Azure Cli Version: 2.7.0
Azure-Devops extension version: 0.18.0
Steps to reproduce the behavior:
1. login using az login
2. setup defaults.
3. Run command:
```
az pipelines variable-group variable create --group-id --name my.variable.name --value '$(some-text)'
```
OR
```
az pipelines variable-group variable create --group-id --name my.variable.name --value "`$(some-text)"
```
4. Notice how the variable actually gets added, but the closing paren is removed. You will also see the error "Failed to load python executable." The same thing happens for the `variable-group variable update` command.
**Expected behavior**
The variable is added or updated with the specified value including the closing paren and I do not receive an error.
**Screenshots**

**Debug logs**
[debug.txt](https://github.com/Azure/azure-devops-cli-extension/files/4806970/debug.txt)
**Additional context**
Note that if I remove the dash from the variable value, then the following command works as expected;
```
az pipelines variable-group variable create --group-id --name my.variable.name --value '$(some text)'
```
Contributor guide
Assessment
This issue has not been assessed yet.