Skip to content

Commit ea2d790

Browse files
Azure-cli - Temporary quick fix for jammy (ARM) (#626)
1 parent 7fcec6e commit ea2d790

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

src/azure-cli/devcontainer-feature.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "azure-cli",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"name": "Azure CLI",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
66
"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 @@
2222
"type": "boolean",
2323
"description": "Optionally install Azure Bicep",
2424
"default": false
25+
},
26+
"installUsingPython": {
27+
"type": "boolean",
28+
"description": "Install Azure CLI using Python instead of pipx",
29+
"default": true
2530
}
2631
},
2732
"customizations": {

src/azure-cli/install.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rm -rf /var/lib/apt/lists/*
1515
AZ_VERSION=${VERSION:-"latest"}
1616
AZ_EXTENSIONS=${EXTENSIONS}
1717
AZ_INSTALLBICEP=${INSTALLBICEP:-false}
18-
18+
INSTALL_USING_PYTHON=${INSTALL_USING_PYTHON:-true}
1919
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
2020
AZCLI_ARCHIVE_ARCHITECTURES="amd64"
2121
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal jammy"
@@ -141,7 +141,12 @@ install_using_pip_strategy() {
141141
ver="==${AZ_VERSION}"
142142
fi
143143

144-
install_with_pipx "${ver}" || install_with_complete_python_installation "${ver}" || return 1
144+
# Temprary quick fix for https://github.com/devcontainers/features/issues/624
145+
if [ "${INSTALL_USING_PYTHON}" = "true" ]; then
146+
install_with_complete_python_installation "${ver}" || install_with_pipx "${ver}" || return 1
147+
else
148+
install_with_pipx "${ver}" || install_with_complete_python_installation "${ver}" || return 1
149+
fi
145150
}
146151

147152
install_with_pipx() {

0 commit comments

Comments
 (0)