Fix #6498: Use Gem to discover the location of bundler. (#6499)

Merge pull request 6499
This commit is contained in:
Jordon Bedwell 2017-10-29 15:31:40 -05:00 committed by jekyllbot
parent c52707bc66
commit 2ecf50f18f
1 changed files with 4 additions and 1 deletions

View File

@ -143,10 +143,13 @@ RUBY
def bundle_install(path) def bundle_install(path)
Jekyll.logger.info "Running bundle install in #{path.cyan}..." Jekyll.logger.info "Running bundle install in #{path.cyan}..."
Dir.chdir(path) do Dir.chdir(path) do
process, output = Jekyll::Utils::Exec.run("bundle", "install") exe = Gem.bin_path("bundler", "bundle")
process, output = Jekyll::Utils::Exec.run("ruby", exe, "install")
output.to_s.each_line do |line| output.to_s.each_line do |line|
Jekyll.logger.info("Bundler:".green, line.strip) unless line.to_s.empty? Jekyll.logger.info("Bundler:".green, line.strip) unless line.to_s.empty?
end end
raise SystemExit unless process.success? raise SystemExit unless process.success?
end end
end end