diff options
| author | Jack Nagel | 2012-05-07 20:32:04 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-05-07 21:05:47 -0500 |
| commit | 68124d481f7938f3bf280fb92d370a0de9a9b80f (patch) | |
| tree | f90db02fcdad95975fb43f830343d014563ced16 /bin | |
| parent | fa1edd684653e324d36c431fa8bc33b95e651f9e (diff) | |
| download | brew-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-x | bin/brew | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |
