aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 11:15:14 -0500
committerJack Nagel2014-07-06 11:15:14 -0500
commitfe7198548805a19ec0a719487d5807cd3eba2fb6 (patch)
treeaa2d48b82a2849058c587b0b31d134a9da85a15a /Library/Homebrew/utils.rb
parentcde41224a209be09adc0e523544e156dcdfbe81d (diff)
downloadhomebrew-fe7198548805a19ec0a719487d5807cd3eba2fb6.tar.bz2
Expand ~ in PATH entries
Diffstat (limited to 'Library/Homebrew/utils.rb')
-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 9d39a72a5..9a73bf829 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).find do |p|
- pcmd = File.join(p, cmd)
+ pcmd = File.expand_path(File.join(p, cmd))
return Pathname.new(pcmd) if File.executable?(pcmd) && !File.directory?(pcmd)
end
return nil