From ab4662bf1960be6bfd199db046c6d374f7cb05a1 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Sat, 20 Mar 2021 17:58:34 +0300 Subject: [PATCH] [twine] Fixed strings regeneration script on Mac OS X Signed-off-by: Roman Tsisyk --- tools/unix/generate_localizations.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/unix/generate_localizations.sh b/tools/unix/generate_localizations.sh index 7c93ddb86e..1d53763e2d 100755 --- a/tools/unix/generate_localizations.sh +++ b/tools/unix/generate_localizations.sh @@ -3,8 +3,10 @@ set -e -u -x # Use ruby from brew on Mac OS X, because system ruby is outdated/broken/will be removed in future releases. case $OSTYPE in darwin*) - if [ -f /usr/local/opt/ruby/bin/ruby ]; then + if [ -x /usr/local/opt/ruby/bin/ruby ]; then PATH="/usr/local/opt/ruby/bin:$PATH" + elif [ -x /opt/homebrew/opt/ruby/bin/ruby ]; then + PATH="/opt/homebrew/opt/ruby/bin:$PATH" else echo 'Please install Homebrew ruby by running "brew install ruby"' exit -1