Skip to content

Commit

Permalink
Azure-cli - Temporary quick fix for jammy (ARM) (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhikhandale authored Jul 22, 2023
1 parent 7fcec6e commit ea2d790
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/azure-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand All @@ -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": {
Expand Down
9 changes: 7 additions & 2 deletions src/azure-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit ea2d790

Please sign in to comment.