aboutsummaryrefslogtreecommitdiff
path: root/src/azure-cli/install.sh
diff options
context:
space:
mode:
authorJosh Spicer <joshspicer@github.com>2022-07-29 21:35:43 +0300
committerJosh Spicer <joshspicer@github.com>2022-07-29 21:35:43 +0300
commit7b13e1601f2a56a7872eb695bb4223a0ea383916 (patch)
treef72b0b2e35eb12c84adc804871e244aafc53dc5c /src/azure-cli/install.sh
parent668a9cf6ac428e7d266f65c8ff143c437ab8273b (diff)
port over https://github.com/microsoft/vscode-dev-containers/issues/1555
Diffstat (limited to 'src/azure-cli/install.sh')
-rwxr-xr-xsrc/azure-cli/install.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/azure-cli/install.sh b/src/azure-cli/install.sh
index d5a586f..3b8be12 100755
--- a/src/azure-cli/install.sh
+++ b/src/azure-cli/install.sh
@@ -164,6 +164,7 @@ install_using_pip() {
echo "(*) Installing Azure CLI..."
. /etc/os-release
architecture="$(dpkg --print-architecture)"
+CACHED_AZURE_VERSION="${AZ_VERSION}" # In case we need to fallback to pip and the apt path has modified the AZ_VERSION variable.
if [[ "${AZCLI_ARCHIVE_ARCHITECTURES}" = *"${architecture}"* ]] && [[ "${AZCLI_ARCHIVE_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then
install_using_apt || use_pip="true"
else
@@ -171,6 +172,7 @@ else
fi
if [ "${use_pip}" = "true" ]; then
+ AZ_VERSION=${CACHED_AZURE_VERSION}
install_using_pip
if [ "$?" != 0 ]; then