Skip to content

Commit fe4f248

Browse files
[6.1] Fix macOS CI: trust microsoft/mssql-release tap for Homebrew 5.2+ (#4363) (#4366)
Co-authored-by: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
1 parent de9d465 commit fe4f248

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,19 @@ steps:
3434
brew install docker
3535
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
3636
brew update
37+
# Homebrew 5.2+ requires explicit trust for third-party taps. Run this
38+
# after 'brew update' so the trust command is available even if the runner
39+
# image shipped an older Homebrew version.
40+
brew trust microsoft/mssql-release
3741
HOMEBREW_ACCEPT_EULA=Y brew install mssql-tools18
3842
43+
# Fail fast if sqlcmd was not installed (e.g. tap-trust or formula error).
44+
# Without this check the script would loop for ~6 minutes trying to connect.
45+
if ! command -v sqlcmd &>/dev/null; then
46+
echo "ERROR: sqlcmd is not on PATH after brew install. Check the mssql-tools18 installation above."
47+
exit 1
48+
fi
49+
3950
# Start Colima with Virtualization.framework for x86_64 binary translation
4051
# on Apple Silicon. Rosetta/binfmt emulation is enabled by default in
4152
# Colima >= 0.8 when using --vm-type vz, which is dramatically faster than

0 commit comments

Comments
 (0)