diff --git a/azure-devops/azext_devops/dev/common/artifacttool_updater.py b/azure-devops/azext_devops/dev/common/artifacttool_updater.py index 4f9c1588..abea392c 100644 --- a/azure-devops/azext_devops/dev/common/artifacttool_updater.py +++ b/azure-devops/azext_devops/dev/common/artifacttool_updater.py @@ -158,10 +158,18 @@ def _get_current_release(organization, override_version): # Distro returns empty strings on Windows currently, so don't even send distro_name = distro.id() or None distro_version = distro.version() or None + os_name = platform.system() + arch = platform.machine() + + # For M1 macs, there is no version of artifact tool. However, the x86_64 + # version can run under Rosetta, so we use that instead. + if os_name == "Darwin" and arch in ["amd64", "arm64"]: + arch = "x86_64" + release = client.get_clienttool_release( "ArtifactTool", - os_name=platform.system(), - arch=platform.machine(), + os_name=os_name, + arch=arch, distro_name=distro_name, distro_version=distro_version, version=override_version)