diff --git a/.azure-pipelines/templates/install-azure-cli-edge.yml b/.azure-pipelines/templates/install-azure-cli-edge.yml index 8285a2ab..c3a99e2b 100644 --- a/.azure-pipelines/templates/install-azure-cli-edge.yml +++ b/.azure-pipelines/templates/install-azure-cli-edge.yml @@ -1,7 +1,3 @@ steps: - # commented out for now because DevOps CLI is broken with latest Azure CLI build - # - script: 'pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge' - # displayName: 'Install Azure CLI Edge' - - - script: pip install azure-cli - displayName: 'Install Azure CLI released version (in place of edge due to active bug)' \ No newline at end of file + - script: 'pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge' + displayName: 'Install Azure CLI Edge' diff --git a/azure-devops/azext_devops/dev/common/config.py b/azure-devops/azext_devops/dev/common/config.py index 20d1c2f8..23400614 100644 --- a/azure-devops/azext_devops/dev/common/config.py +++ b/azure-devops/azext_devops/dev/common/config.py @@ -4,8 +4,6 @@ # -------------------------------------------------------------------------------------------- import os -import stat -from six.moves import configparser from knack.config import CLIConfig, get_config_parser from knack.util import ensure_dir @@ -39,24 +37,9 @@ def __init__(self, config_dir=AZ_DEVOPS_GLOBAL_CONFIG_DIR, config_env_var_prefix azdevops_config.config_parser.read(AZ_DEVOPS_GLOBAL_CONFIG_PATH) -def set_global_config(config): - ensure_dir(AZ_DEVOPS_GLOBAL_CONFIG_DIR) - with open(AZ_DEVOPS_GLOBAL_CONFIG_PATH, 'w') as configfile: - config.write(configfile) - os.chmod(AZ_DEVOPS_GLOBAL_CONFIG_PATH, stat.S_IRUSR | stat.S_IWUSR) - # reload config - azdevops_config.config_parser.read(AZ_DEVOPS_GLOBAL_CONFIG_PATH) - - def set_global_config_value(section, option, value): - config = get_config_parser() - config.read(AZ_DEVOPS_GLOBAL_CONFIG_PATH) - try: - config.add_section(section) - except configparser.DuplicateSectionError: - pass - config.set(section, option, _normalize_config_value(value)) - set_global_config(config) + azdevops_config.set_value(section, option, _normalize_config_value(value)) + azdevops_config.config_parser.read(AZ_DEVOPS_GLOBAL_CONFIG_PATH) def _normalize_config_value(value): diff --git a/azure-devops/azext_devops/dev/team/configure.py b/azure-devops/azext_devops/dev/team/configure.py index cb82867e..f81ac641 100644 --- a/azure-devops/azext_devops/dev/team/configure.py +++ b/azure-devops/azext_devops/dev/team/configure.py @@ -75,7 +75,7 @@ def print_current_configuration(file_config=None): env_vars = [ev for ev in os.environ if ev.startswith(CLI_ENV_VARIABLE_PREFIX)] if env_vars: print(MSG_HEADING_ENV_VARS) - print('\n'.join(['{} = {}'.format(ev, os.environ[ev]) for ev in env_vars])) + print('\n'.join(['{}'.format(ev) for ev in env_vars])) MSG_INTRO = '\nWelcome to the Azure DevOps CLI! This command will guide you through setting some default values.\n'