diff options
| author | Jack Nagel | 2012-05-07 20:32:04 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-05-07 21:05:47 -0500 |
| commit | 76604c1cd5e5a925310db3734df39f4cb5fc21ea (patch) | |
| tree | df42773aece2ce1dd16bb5f956a3fdfeb4c92ccd /bin | |
| parent | 839d0ddad8a8c89e5834a9f5326203c98c10714b (diff) | |
| download | homebrew-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-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 |
