aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2023-07-22 03:37:10 +0300
committerGitHub <noreply@github.com>2023-07-22 03:37:10 +0300
commitea2d79070ec4e91361412a88ead2ec9b78266b92 (patch)
tree1db8516d55a39666f57b2cb54cd77f2997956351
parent7fcec6e7c9dd587b24096597367ef42e4a37465b (diff)
Azure-cli - Temporary quick fix for jammy (ARM) (#626)feature_azure-cli_1.2.0
-rw-r--r--src/azure-cli/devcontainer-feature.json7
-rwxr-xr-xsrc/azure-cli/install.sh9
2 files changed, 13 insertions, 3 deletions
diff --git a/src/azure-cli/devcontainer-feature.json b/src/azure-cli/devcontainer-feature.json
index 901ba4f..09c295c 100644
--- a/src/azure-cli/devcontainer-feature.json
+++ b/src/azure-cli/devcontainer-feature.json
@@ -1,6 +1,6 @@
{
"id": "azure-cli",
- "version": "1.1.0",
+ "version": "1.2.0",
"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.",
@@ -22,6 +22,11 @@
"type": "boolean",
"description": "Optionally install Azure Bicep",
"default": false
+ },
+ "installUsingPython": {
+ "type": "boolean",
+ "description": "Install Azure CLI using Python instead of pipx",
+ "default": true
}
},
"customizations": {
diff --git a/src/azure-cli/install.sh b/src/azure-cli/install.sh
index 181d62f..9b0d72d 100755
--- a/src/azure-cli/install.sh
+++ b/src/azure-cli/install.sh
@@ -15,7 +15,7 @@ rm -rf /var/lib/apt/lists/*
AZ_VERSION=${VERSION:-"latest"}
AZ_EXTENSIONS=${EXTENSIONS}
AZ_INSTALLBICEP=${INSTALLBICEP:-false}
-
+INSTALL_USING_PYTHON=${INSTALL_USING_PYTHON:-true}
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
AZCLI_ARCHIVE_ARCHITECTURES="amd64"
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal jammy"
@@ -141,7 +141,12 @@ install_using_pip_strategy() {
ver="==${AZ_VERSION}"
fi
- install_with_pipx "${ver}" || install_with_complete_python_installation "${ver}" || return 1
+ # 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
+ install_with_pipx "${ver}" || install_with_complete_python_installation "${ver}" || return 1
+ fi
}
install_with_pipx() {