aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJack Nagel2012-05-07 20:32:04 -0500
committerJack Nagel2012-05-07 21:05:47 -0500
commit76604c1cd5e5a925310db3734df39f4cb5fc21ea (patch)
treedf42773aece2ce1dd16bb5f956a3fdfeb4c92ccd /bin
parent839d0ddad8a8c89e5834a9f5326203c98c10714b (diff)
downloadhomebrew-76604c1cd5e5a925310db3734df39f4cb5fc21ea.tar.bz2
Unify 'which' and which_s' utility methods
'which' only returns a Pathname or nil, and doesn't care about anything sent to stderr, so just silence it by default and combine the two methods. Closes #12115. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index eba542724..ac713539c 100755
--- a/bin/brew
+++ b/bin/brew
@@ -72,7 +72,7 @@ begin
# Add example external commands to PATH before checking.
ENV['PATH'] += ":#{HOMEBREW_REPOSITORY}/Library/Contributions/cmds"
- if which_s "brew-#{cmd}"
+ if which "brew-#{cmd}"
%w[CACHE CELLAR LIBRARY_PATH PREFIX REPOSITORY].each do |e|
ENV["HOMEBREW_#{e}"] = Object.const_get "HOMEBREW_#{e}"
end