From 6e60b1d8c3fa1b76b6214ca6df16876b4b2f5075 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 6 Jul 2014 13:36:58 -0500 Subject: Let File.expand_path also do the join --- Library/Homebrew/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') 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 -- cgit v1.2.3