lib/bundler.rb in bundler-1.4.0.rc.1 vs lib/bundler.rb in bundler-1.5.0.rc.1

- old
+ new

@@ -288,11 +288,11 @@ FileUtils.mkdir_p(path) end 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| File.executable?(File.join(p, executable)) end @@ -352,10 +352,11 @@ def clear_gemspec_cache @gemspec_cache = {} end def git_present? - @git_present ||= Bundler.which("git") + return @git_present if defined?(@git_present) + @git_present = Bundler.which("git") || Bundler.which("git.exe") end def ruby_version @ruby_version ||= SystemRubyVersion.new end