diff options
author | rhysd <lin90162@yahoo.co.jp> | 2013-11-07 02:50:14 +0900 |
---|---|---|
committer | rhysd <lin90162@yahoo.co.jp> | 2013-11-07 02:50:14 +0900 |
commit | 0b955b6f97069917666326627aa027b66b81c635 (patch) | |
tree | 23b5479584da06953c4a6da567df0946528bda3d | |
parent | 02af5bcc0631c4b99d8081348b49471778d34d95 (diff) | |
download | bundler-0b955b6f97069917666326627aa027b66b81c635.tar.gz |
Fix Bundler::which
Bundler::which doesn't return nil if the argument is a name of
directory. This is because File::executable? returns true when its
argument is a name of directory. I fixed it with File::file?.
-rw-r--r-- | lib/bundler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 1c6e3bacf2..50fed96955 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -290,7 +290,7 @@ module Bundler end def which(executable) - if File.executable?(executable) + if File.file?(executable) && File.executable?(executable) executable elsif ENV['PATH'] path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p| |