diff options
| author | Jack Nagel | 2014-07-06 13:36:58 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-06 13:36:58 -0500 |
| commit | 680d6ef16a60486e55877330042827c54a41138f (patch) | |
| tree | 88585fd34ee581cd791cac3906f442807913fae0 | |
| parent | 53db7cf17ec0ee3518b91d9fce0183e9f53ab7ee (diff) | |
| download | homebrew-680d6ef16a60486e55877330042827c54a41138f.tar.bz2 | |
Let File.expand_path also do the join
| -rw-r--r-- | Library/Homebrew/utils.rb | 2 |
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 |
