From 1ab214180bd8f06f0e49b12af33789cae506e6a8 Mon Sep 17 00:00:00 2001 From: Samruddhi Khandale Date: Wed, 26 Jul 2023 19:02:21 +0000 Subject: [PATCH] Azure-cli: Revert temporary fix which installed az with python --- src/azure-cli/devcontainer-feature.json | 4 ++-- src/azure-cli/install.sh | 1 - test/azure-cli/install_with_python.sh | 14 ++++++++++++++ test/azure-cli/scenarios.json | 10 ++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 test/azure-cli/install_with_python.sh diff --git a/src/azure-cli/devcontainer-feature.json b/src/azure-cli/devcontainer-feature.json index 09c295c21..3d1c0dfa3 100644 --- a/src/azure-cli/devcontainer-feature.json +++ b/src/azure-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "azure-cli", - "version": "1.2.0", + "version": "1.2.1", "name": "Azure CLI", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli", "description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.", @@ -26,7 +26,7 @@ "installUsingPython": { "type": "boolean", "description": "Install Azure CLI using Python instead of pipx", - "default": true + "default": false } }, "customizations": { diff --git a/src/azure-cli/install.sh b/src/azure-cli/install.sh index 9b0d72db3..51759488d 100755 --- a/src/azure-cli/install.sh +++ b/src/azure-cli/install.sh @@ -141,7 +141,6 @@ install_using_pip_strategy() { ver="==${AZ_VERSION}" fi - # Temprary quick fix for https://github.com/devcontainers/features/issues/624 if [ "${INSTALL_USING_PYTHON}" = "true" ]; then install_with_complete_python_installation "${ver}" || install_with_pipx "${ver}" || return 1 else diff --git a/test/azure-cli/install_with_python.sh b/test/azure-cli/install_with_python.sh new file mode 100644 index 000000000..4848ac55f --- /dev/null +++ b/test/azure-cli/install_with_python.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +# Import test library for `check` command +source dev-container-features-test-lib + +# Check to make sure the user is vscode +check "user is vscode" whoami | grep vscode +check "version" az --version + + +# Report result +reportResults \ No newline at end of file diff --git a/test/azure-cli/scenarios.json b/test/azure-cli/scenarios.json index 231345225..b7a732395 100644 --- a/test/azure-cli/scenarios.json +++ b/test/azure-cli/scenarios.json @@ -28,5 +28,15 @@ "installBicep": true } } + }, + "install_with_python": { + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "user": "vscode", + "features": { + "azure-cli": { + "version": "latest", + "installUsingPython": true + } + } } } \ No newline at end of file