cmd/update.sh: define conditions for unsetting HOMEBREW_RUBY_PATH

This commit is contained in:
Maxim Belkin 2020-05-12 11:50:12 -05:00
parent 9124e07b54
commit 1cba5821fd
No known key found for this signature in database
GPG Key ID: AC71560D4C5F2338

View File

@ -599,6 +599,13 @@ EOS
-d "$HOMEBREW_LIBRARY/LinkedKegs" || -d "$HOMEBREW_LIBRARY/LinkedKegs" ||
(-n "$HOMEBREW_DEVELOPER" && -z "$HOMEBREW_UPDATE_PREINSTALL") ]] (-n "$HOMEBREW_DEVELOPER" && -z "$HOMEBREW_UPDATE_PREINSTALL") ]]
then 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 "$@" brew update-report "$@"
return $? return $?
elif [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] elif [[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]]