Merge pull request #4857 from jekyll/fix/dont-rescue-load-error-for-bundler

Merge pull request 4857
This commit is contained in:
jekyllbot 2016-04-29 12:22:46 -07:00
commit 6c081427c4
1 changed files with 4 additions and 4 deletions

View File

@ -30,16 +30,16 @@ module Jekyll
def self.require_from_bundler
if !ENV["JEKYLL_NO_BUNDLER_REQUIRE"] && File.file?("Gemfile")
require "bundler"
Bundler.setup # puts all groups on the load path
required_gems = Bundler.require(:jekyll_plugins) # requires the gems in this group only
Bundler.setup
required_gems = Bundler.require(:jekyll_plugins)
Jekyll.logger.debug("PluginManager:", "Required #{required_gems.map(&:name).join(', ')}")
ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = "true"
true
else
false
end
rescue LoadError, Bundler::GemfileNotFound
false
end
# Check whether a gem plugin is allowed to be used during this build.