From 6bd6b2b227379e4cee5816f67290f5d7def4ea6b Mon Sep 17 00:00:00 2001 From: Tim Hurski Date: Fri, 5 Dec 2025 00:28:42 +0000 Subject: [PATCH] Fix macOS build failures by making brew uninstall commands non-fatal The jarbuild workflow was failing on macOS because it tried to uninstall Homebrew formulas that don't exist or aren't installed: - aws-sdk-cpp (may not be installed) - re2 (may not be installed) - protobuf (may not be installed) These uninstall commands were failing with exit code 1, causing the entire build to fail. By adding '|| :' to these commands, we make them non-fatal so the build can continue even if the formulas aren't installed. The grpc and grpc@1.54 uninstall commands already had '|| :' and were working correctly. --- .github/workflows/jarbuild.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jarbuild.yml b/.github/workflows/jarbuild.yml index ae2981cd6d..f727006166 100644 --- a/.github/workflows/jarbuild.yml +++ b/.github/workflows/jarbuild.yml @@ -246,18 +246,18 @@ jobs: # Homebrew's aws-sdk-cpp, our build mix Homebrew's # aws-sdk-cpp and bundled aws-sdk-cpp. We uninstall Homebrew's # aws-sdk-cpp to ensure using only bundled aws-sdk-cpp. - brew uninstall aws-sdk-cpp + brew uninstall aws-sdk-cpp || : # We want to use bundled RE2 for static linking. If # Homebrew's RE2 is installed, its header file may be used. # We uninstall Homebrew's RE2 to ensure using bundled RE2. brew uninstall grpc || : # gRPC depends on RE2 brew uninstall grpc@1.54 || : # gRPC 1.54 may be installed too - brew uninstall re2 + brew uninstall re2 || : # We want to use bundled Protobuf for static linking. If # Homebrew's Protobuf is installed, its library file may be # used on test We uninstall Homebrew's Protobuf to ensure using # bundled Protobuf. - brew uninstall protobuf + brew uninstall protobuf || : brew bundle --file=Brewfile - name: Prepare ccache