Azure / Azure/azure-cli

az cli query parameter freaks out if there is no space after a common only on Windows (pwsh core and win pwsh)

Open
#18,148 2 comments 0 reactions 1 assignee Claimed by @evelyn-ys View on GitHub
act-identity-squad feature-request KeyVault
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **az cli query parameter freaks out if there is no space after a common only on Windows (powershell core and windows powershell)., but okay on powershell core on macOS**

## A space is required after , in JMESPATH contains function, only when run on Windows

**Command Name**
```
$AzSubName = ""
$AzKeyvaultName = ""
$SecretNamePattern = " "C:\Users\joe.paul\scoop\apps\azure-cli\current\wbin\\..\python.exe" -IBm azure.cli keyvault secret list --subscription "SingleCell Progenitor Prod" --vault-name portt-prod-syd-akv --query [?contains(name,'snowflake')].{SecretNames:name} -o table

```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
As mentioned above.
NOTE THERE IS NO SPACE AFTER COMMA IN CONTAINS FUNCTION
```
[?contains(name,`'$SecretNamePattern`')].{SecretNames:name}
```
```
az keyvault secret list --subscription $AzSubName --vault-name $AzKeyvaultName --query "[?contains(name,`'$SecretNamePattern`')].{SecretNames:name}" -o table
```
## Expected Behavior
The results should be displayed.

## Environment Summary
```
Windows-10-10.0.19041-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.23.0

Extensions:
aks-preview 0.4.65

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.