Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit a805853

Browse files
committed
https://github.com/microsoft/vscode-dev-containers/issues/1555
Cache AZ_VERSION in case we need to fallback to pip and the apt path has modified the AZ_VERSION variable.
1 parent 10bf6f7 commit a805853

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script-library/azcli-debian.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,16 @@ install_using_pip() {
165165
echo "(*) Installing Azure CLI..."
166166
. /etc/os-release
167167
architecture="$(dpkg --print-architecture)"
168+
CACHED_AZURE_VERSION="${AZ_VERSION}" # In case we need to fallback to pip and the apt path has modified the AZ_VERSION variable.
168169
if [[ "${AZCLI_ARCHIVE_ARCHITECTURES}" = *"${architecture}"* ]] && [[ "${AZCLI_ARCHIVE_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then
169170
install_using_apt || use_pip="true"
171+
use_pip="true"
170172
else
171173
use_pip="true"
172174
fi
173175

174176
if [ "${use_pip}" = "true" ]; then
177+
AZURE_VERSION=${CACHED_AZURE_VERSION}
175178
install_using_pip
176179

177180
if [ "$?" != 0 ]; then

0 commit comments

Comments
 (0)