From 9ef31d95c73084eb8854bddb74482db70615a811 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:28:01 -0500 Subject: [PATCH] build(macos): Check if pkg-config is installed before installing it. --- .../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