aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
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 0bbf8a795..bdc51ebfa 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -185,7 +185,7 @@ end
def which cmd, path=ENV['PATH']
path.split(File::PATH_SEPARATOR).each do |p|
pcmd = File.expand_path(File.join(p, cmd))
- return Pathname.new(pcmd) if File.executable?(pcmd) && !File.directory?(pcmd)
+ return Pathname.new(pcmd) if File.file?(pcmd) && File.executable?(pcmd)
end
return nil
end