From 44604c1c78b0763b0bef54ea30b7ef8c36ffc40e Mon Sep 17 00:00:00 2001 From: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:07:05 -0500 Subject: [PATCH] fix(gh-macos-build): Check if pkg-config is installed before trying to install it (fixes #610). (#611) --- .../core/tools/scripts/lib_install/macos/install-all.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/core/tools/scripts/lib_install/macos/install-all.sh b/components/core/tools/scripts/lib_install/macos/install-all.sh index 99e178e92..97e41903d 100755 --- a/components/core/tools/scripts/lib_install/macos/install-all.sh +++ b/components/core/tools/scripts/lib_install/macos/install-all.sh @@ -21,5 +21,12 @@ brew install \ mongo-cxx-driver \ msgpack-cxx \ spdlog \ - pkg-config \ zstd + +# Install pkg-config if it isn't already installed +# NOTE: We might expect that pkg-config is installed through brew, so trying to install it again +# would be harmless; however, in certain environments, like the macOS GitHub hosted runner, +# pkg-config is installed by other means, meaning a brew install would cause conflicts. +if ! command -v pkg-config ; then + brew install pkg-config +fi