microsoft / knack

Knack - A Python command line interface framework
https://pypi.python.org/pypi/knack
MIT License
348 stars 95 forks source link

[Config] Make config items case-insensitive #220

Closed evelyn-ys closed 3 years ago

evelyn-ys commented 4 years ago

Description

Fix https://github.com/Azure/azure-cli/issues/14397: az configure --list-defaults should not be case sensitive for environment variables

Testing Guide

preparation(need Azure CLI in advance)

az configure --defaults location=eastus
export AZURE_DEFAULTS_LOCATION=eastasia

test

az configure --list-defaults

results before

[
  {
    "name": "LOCATION",
    "source": "AZURE_DEFAULTS_LOCATION",
    "value": "eastasia"
  },
  {
    "name": "location",
    "source": "C:\\Users\\yishiwang\\.azure\\config",
    "value": "eastus"
  }
]

results after

[
  {
    "name": "LOCATION",
    "source": "AZURE_DEFAULTS_LOCATION",
    "value": "eastasia"
  }
]
evelyn-ys commented 3 years ago

looks good now