From 1cba5821fd8d26c1e9ba55e368644c529838c404 Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Tue, 12 May 2020 11:50:12 -0500 Subject: [PATCH] cmd/update.sh: define conditions for unsetting HOMEBREW_RUBY_PATH --- Library/Homebrew/cmd/update.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 19ece3f2d0..216729e5ed 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -599,6 +599,13 @@ EOS -d "$HOMEBREW_LIBRARY/LinkedKegs" || (-n "$HOMEBREW_DEVELOPER" && -z "$HOMEBREW_UPDATE_PREINSTALL") ]] then + if [[ -n $HOMEBREW_FORCE_VENDOR_RUBY && + -x $HOMEBREW_LIBRARY/Homebrew/vendor/portable-ruby/current/bin/ruby ]] + then + export HOMEBREW_RUBY_PATH="$HOMEBREW_LIBRARY/Homebrew/vendor/portable-ruby/current/bin/ruby" + elif [[ -z $HOMEBREW_DEVELOPER ]]; then + unset HOMEBREW_RUBY_PATH + fi brew update-report "$@" return $? elif [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]]