aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/azure-cli/devcontainer-feature.json4
-rwxr-xr-xsrc/azure-cli/install.sh1
-rw-r--r--test/azure-cli/install_with_python.sh14
-rw-r--r--test/azure-cli/scenarios.json10
4 files changed, 26 insertions, 3 deletions
diff --git a/src/azure-cli/devcontainer-feature.json b/src/azure-cli/devcontainer-feature.json
index 09c295c..3d1c0df 100644
--- a/src/azure-cli/devcontainer-feature.json
+++ b/src/azure-cli/devcontainer-feature.json
@@ -1,6 +1,6 @@
{
"id": "azure-cli",
- "version": "1.2.0",
+ "version": "1.2.1",
"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.",
@@ -26,7 +26,7 @@
"installUsingPython": {
"type": "boolean",
"description": "Install Azure CLI using Python instead of pipx",
- "default": true
+ "default": false
}
},
"customizations": {
diff --git a/src/azure-cli/install.sh b/src/azure-cli/install.sh
index 9b0d72d..5175948 100755
--- a/src/azure-cli/install.sh
+++ b/src/azure-cli/install.sh
@@ -141,7 +141,6 @@ install_using_pip_strategy() {
ver="==${AZ_VERSION}"
fi
- # 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
diff --git a/test/azure-cli/install_with_python.sh b/test/azure-cli/install_with_python.sh
new file mode 100644
index 0000000..4848ac5
--- /dev/null
+++ b/test/azure-cli/install_with_python.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+# Import test library for `check` command
+source dev-container-features-test-lib
+
+# Check to make sure the user is vscode
+check "user is vscode" whoami | grep vscode
+check "version" az --version
+
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/azure-cli/scenarios.json b/test/azure-cli/scenarios.json
index 2313452..b7a7323 100644
--- a/test/azure-cli/scenarios.json
+++ b/test/azure-cli/scenarios.json
@@ -28,5 +28,15 @@
"installBicep": true
}
}
+ },
+ "install_with_python": {
+ "image": "mcr.microsoft.com/devcontainers/base:jammy",
+ "user": "vscode",
+ "features": {
+ "azure-cli": {
+ "version": "latest",
+ "installUsingPython": true
+ }
+ }
}
} \ No newline at end of file