From 38f4b80a0eaeff681028fc330486af1abf904c0c Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Fri, 8 Dec 2023 15:51:29 -0500 Subject: [PATCH] Make VMR sync work on macOS 12, hopefully --- eng/vmr-sync.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eng/vmr-sync.sh b/eng/vmr-sync.sh index 3f668a4cf..a9f902180 100755 --- a/eng/vmr-sync.sh +++ b/eng/vmr-sync.sh @@ -94,8 +94,8 @@ function highlight () { echo "${COLOR_CYAN}$FAILURE_PREFIX${1//${COLOR_RESET}/${COLOR_CYAN}}${COLOR_CLEAR}" } -echo "*** DEBUG $(which realpath)" -installer_dir=$(realpath "$scriptroot/../") +# realpath is not available in macOS 12, try horrible-but-portable workaround +installer_dir=$(cd "$scriptroot/../"; pwd -P) tmp_dir='' vmr_dir='' @@ -239,7 +239,8 @@ set -e highlight 'Installing .NET, preparing the tooling..' source "$scriptroot/common/tools.sh" InitializeDotNetCli true -dotnet=$(realpath "$scriptroot/../.dotnet/dotnet") +dotnetDir=$( cd $scriptroot/../.dotnet/; pwd -P ) +dotnet=$dotnetDir/dotnet "$dotnet" tool restore highlight "Starting the synchronization of '$repository'.."