diff options
author | rhysd <lin90162@yahoo.co.jp> | 2013-11-07 02:50:14 +0900 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2013-11-09 18:39:50 -0500 |
commit | 628927b6eebf2523ad18f7042da6ac598d000d61 (patch) | |
tree | 23b5479584da06953c4a6da567df0946528bda3d /lib/bundler.rb | |
parent | 146431bf176222c5f66ecc3fd42c8cb526714da8 (diff) | |
download | bundler-628927b6eebf2523ad18f7042da6ac598d000d61.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?.
Diffstat (limited to 'lib/bundler.rb')
-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 1c6e3bac..50fed969 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| |