lib/bundler.rb in bundler-1.9.0.pre.1 vs lib/bundler.rb in bundler-1.9.0.rc
- old
+ new
@@ -314,10 +314,11 @@
def which(executable)
if File.file?(executable) && File.executable?(executable)
executable
elsif ENV['PATH']
path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
- File.executable?(File.join(p, executable))
+ abs_path = File.join(p, executable)
+ File.file?(abs_path) && File.executable?(abs_path)
end
path && File.expand_path(executable, path)
end
end