aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 13:36:58 -0500
committerJack Nagel2014-07-06 13:36:58 -0500
commit6e60b1d8c3fa1b76b6214ca6df16876b4b2f5075 (patch)
treed6cfb8643fe15d3146c56526998b98c6aae05a12 /Library
parent7bd4f76b8ca090e3dd266e68e0a7fe1b1c41277b (diff)
downloadbrew-6e60b1d8c3fa1b76b6214ca6df16876b4b2f5075.tar.bz2
Let File.expand_path also do the join
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 bdc51ebfa..8035a21cd 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -184,7 +184,7 @@ end
def which cmd, path=ENV['PATH']
path.split(File::PATH_SEPARATOR).each do |p|
- pcmd = File.expand_path(File.join(p, cmd))
+ pcmd = File.expand_path(cmd, p)
return Pathname.new(pcmd) if File.file?(pcmd) && File.executable?(pcmd)
end
return nil