From b418fe94c84e229425188ff1b873b34db7b6baf7 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 11 Jul 2016 16:57:33 +0100 Subject: ruby.sh: fix original setup ruby path name. --- Library/Homebrew/utils/ruby.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index 6ff97b772..931f18ac4 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -1,4 +1,4 @@ -origin-setup-ruby-path() { +original-setup-ruby-path() { if [[ -z "$HOMEBREW_DEVELOPER" ]] then unset HOMEBREW_RUBY_PATH @@ -24,7 +24,7 @@ origin-setup-ruby-path() { setup-ruby-path() { if [[ -z "$HOMEBREW_USE_VENDOR_RUBY" ]] then - origin-setup-ruby-path + original-setup-ruby-path return fi -- cgit v1.2.3 From 5a2eaf9a1225cfe6f878101e0ff5d647b271b958 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 11 Jul 2016 16:57:57 +0100 Subject: ruby.sh: allow forcing the usage of the vendored Ruby. --- Library/Homebrew/utils/ruby.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index 931f18ac4..98fd34c1b 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -22,7 +22,7 @@ original-setup-ruby-path() { } setup-ruby-path() { - if [[ -z "$HOMEBREW_USE_VENDOR_RUBY" ]] + if [[ -z "$HOMEBREW_USE_VENDOR_RUBY" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] then original-setup-ruby-path return @@ -70,7 +70,7 @@ setup-ruby-path() { ruby_version_major="${ruby_version_major%%.*}" fi - if [[ "$ruby_version_major" != "2" ]] + if [[ "$ruby_version_major" != "2" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" ]] then brew vendor-install ruby --quiet if [[ ! -x "$vendor_ruby_path" ]] -- cgit v1.2.3 From dd14357b484b1d3b05a79ea61bbf1e06ea63f273 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 12 Jul 2016 08:51:36 +0100 Subject: brew.sh: only setup/install Ruby when running Ruby. --- Library/brew.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Library') diff --git a/Library/brew.sh b/Library/brew.sh index 3e137323c..03eaa4390 100644 --- a/Library/brew.sh +++ b/Library/brew.sh @@ -209,11 +209,6 @@ EOS esac fi -# Hide shellcheck complaint: -# shellcheck source=/dev/null -source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh" -setup-ruby-path - # Hide shellcheck complaint: # shellcheck source=/dev/null source "$HOMEBREW_LIBRARY/Homebrew/utils/analytics.sh" @@ -243,6 +238,11 @@ then source "$HOMEBREW_BASH_COMMAND" { update-preinstall; "homebrew-$HOMEBREW_COMMAND" "$@"; exit $?; } else + # Hide shellcheck complaint: + # shellcheck source=/dev/null + source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh" + setup-ruby-path + # Unshift command back into argument list (unless argument list was empty). [[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@" { update-preinstall; exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"; } -- cgit v1.2.3