aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-07-12 08:51:36 +0100
committerMike McQuaid2016-07-12 08:51:36 +0100
commitdd14357b484b1d3b05a79ea61bbf1e06ea63f273 (patch)
treef21e0bb4d71be3191a998479ec83013ae8d17a89 /Library
parent5a2eaf9a1225cfe6f878101e0ff5d647b271b958 (diff)
downloadbrew-dd14357b484b1d3b05a79ea61bbf1e06ea63f273.tar.bz2
brew.sh: only setup/install Ruby when running Ruby.
Diffstat (limited to 'Library')
-rw-r--r--Library/brew.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/brew.sh b/Library/brew.sh
index 3e137323c..03eaa4390 100644
--- a/Library/brew.sh
+++ b/Library/brew.sh
@@ -211,11 +211,6 @@ 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"
setup-analytics
report-analytics-screenview-command
@@ -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" "$@"; }