From c077d9830dfa71e2fcc1a6708bc229e2a9fb4606 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Mon, 15 Jun 2026 16:44:34 -0300 Subject: [PATCH] [6.1] Fix macOS CI: trust microsoft/mssql-release tap for Homebrew 5.2+ (#4363) Homebrew 5.2.0 made untrusted-tap enforcement the default. After 'brew update' pulls in the new version, 'brew install mssql-tools18' is refused because the microsoft/mssql-release tap is untrusted. Add 'brew trust microsoft/mssql-release' after 'brew update' to explicitly trust the Microsoft tap (placed after update so the trust command is available even on older runner images). Add a fail-fast check after 'brew install mssql-tools18' to immediately abort with a clear error if sqlcmd is not on PATH, avoiding the 6-minute timeout loop. --- .../steps/configure-sql-server-macos-step.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml b/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml index 96175b87bd..72fee62e63 100644 --- a/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml +++ b/eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml @@ -34,8 +34,19 @@ steps: brew install docker brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew update + # Homebrew 5.2+ requires explicit trust for third-party taps. Run this + # after 'brew update' so the trust command is available even if the runner + # image shipped an older Homebrew version. + brew trust microsoft/mssql-release HOMEBREW_ACCEPT_EULA=Y brew install mssql-tools18 + # Fail fast if sqlcmd was not installed (e.g. tap-trust or formula error). + # Without this check the script would loop for ~6 minutes trying to connect. + if ! command -v sqlcmd &>/dev/null; then + echo "ERROR: sqlcmd is not on PATH after brew install. Check the mssql-tools18 installation above." + exit 1 + fi + # Start Colima with Virtualization.framework for x86_64 binary translation # on Apple Silicon. Rosetta/binfmt emulation is enabled by default in # Colima >= 0.8 when using --vm-type vz, which is dramatically faster than