aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2014-03-16 16:05:05 -0700
committerAdam Vandenberg2014-03-16 16:05:15 -0700
commit1bf7eedadf73046de3d47025db8bc03465c2952f (patch)
treef6952a2c3b76defa811dc8e85354f9afe24cc335 /Library
parent8ce77b0504c039ee533707c116ebfe67ba506358 (diff)
downloadhomebrew-1bf7eedadf73046de3d47025db8bc03465c2952f.tar.bz2
which is supposed to return a pathname
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 9c78b91a0..1322abc8d 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -172,7 +172,7 @@ end
def which cmd, path=ENV['PATH']
path.split(File::PATH_SEPARATOR).find do |p|
pcmd = File.join(p, cmd)
- return pcmd if File.executable?(pcmd) && !File.directory?(pcmd)
+ return Pathname.new(pcmd) if File.executable?(pcmd) && !File.directory?(pcmd)
end
return nil
end