From e5587e549f8ad2cb9ad0596fa56fe8a9f4cc05a5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 12:31:19 -0800 Subject: [PATCH] [release/5.0] Add workarounds for brew on old OSX images (#45809) * Add workarounds for brew on old OSX images * Don't remove openssl directories * Use azdo env var * Add logging Co-authored-by: Santiago Fernandez Madero --- eng/install-native-dependencies.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 63a5acdd369639..a1eb3eb259a17c 100755 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -11,6 +11,18 @@ if [ "$1" = "Linux" ]; then fi elif [ "$1" = "OSX" ] || [ "$1" = "tvOS" ] || [ "$1" = "iOS" ]; then engdir=$(dirname "${BASH_SOURCE[0]}") + + # run this only on AzDo + if [ "$BUILD_BUILDNUMBER" != "" ]; then + # workaround for old osx images on hosted agents + # piped in case we get an agent without these values installed + if ! brew_output="$(brew uninstall openssl@1.0.2t 2>&1 >/dev/null)"; then + echo "didn't uninstall openssl@1.0.2t" + else + echo "succesfully uninstalled openssl@1.0.2t" + fi + fi + brew update --preinstall brew bundle --no-upgrade --no-lock --file "${engdir}/Brewfile" if [ "$?" != "0" ]; then