aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 11:16:10 -0500
committerJack Nagel2014-07-06 11:16:10 -0500
commit7e268670ed4e2dec9a83cb8a79295135fb1c2110 (patch)
tree9818f719414e7af1dab8e43b27180b69a4bd7867 /Library
parentc7ac8ce454d449dfe7486f9ff2eb5e369b86dd2f (diff)
downloadbrew-7e268670ed4e2dec9a83cb8a79295135fb1c2110.tar.bz2
Just use each since we're returning from inside the block
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 9a73bf829..0bbf8a795 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -183,7 +183,7 @@ def puts_columns items, star_items=[]
end
def which cmd, path=ENV['PATH']
- path.split(File::PATH_SEPARATOR).find do |p|
+ path.split(File::PATH_SEPARATOR).each do |p|
pcmd = File.expand_path(File.join(p, cmd))
return Pathname.new(pcmd) if File.executable?(pcmd) && !File.directory?(pcmd)
end