From 6dff37b3dde3fd61092c81d1500c92b34058ce05 Mon Sep 17 00:00:00 2001 From: Hang Lei Date: Thu, 1 Aug 2024 16:59:44 +0800 Subject: [PATCH] Init --- src/azure-cli/azure/cli/__main__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/azure-cli/azure/cli/__main__.py b/src/azure-cli/azure/cli/__main__.py index 5a1a140477c..ad8d1f306de 100644 --- a/src/azure-cli/azure/cli/__main__.py +++ b/src/azure-cli/azure/cli/__main__.py @@ -69,6 +69,19 @@ def cli_main(cli, args): init_finish_time - start_time, invoke_finish_time - init_finish_time) + import os + from azure.cli.core._environment import _ENV_AZ_INSTALLER + + if os.getenv(_ENV_AZ_INSTALLER) == 'DOCKER': + import distro + + if distro.id() == 'alpine' and az_cli.config.getboolean('core', 'show_alpine_warning', True): + logger.warning("Azure CLI 2.63.0 is the last version supported on the Alpine docker image. Microsoft will not " + "be providing additional updates or bug fixes for this image. Consider migrating to the Azure " + "Linux based image for the Azure CLI, which is fully supported." + "For more details, see https://learn.microsoft.com/en-us/cli/azure/run-azure-cli-docker\n\n" + "To hide this warning, please run `az config set core.show_alpine_warning=false`") + try: # check for new version auto-upgrade if exit_code == 0 and az_cli.config.getboolean('auto-upgrade', 'enable', False) and \