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
commit68124d481f7938f3bf280fb92d370a0de9a9b80f (patch)
treef90db02fcdad95975fb43f830343d014563ced16 /bin
parentfa1edd684653e324d36c431fa8bc33b95e651f9e (diff)
downloadbrew-68124d481f7938f3bf280fb92d370a0de9a9b80f.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 Homebrew/homebrew#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