aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 818354993..2224e4ed0 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -166,8 +166,8 @@ def puts_columns items, star_items=[]
end
end
-def which cmd
- dir = ENV['PATH'].split(':').find {|p| File.executable? File.join(p, cmd)}
+def which cmd, path=ENV['PATH']
+ dir = path.split(':').find {|p| File.executable? File.join(p, cmd)}
Pathname.new(File.join(dir, cmd)) unless dir.nil?
end