Merge pull request #3119 from jekyll/fix-bundle-require
This commit is contained in:
commit
9a94829bcb
|
@ -33,11 +33,12 @@ module Jekyll
|
|||
end
|
||||
|
||||
def self.require_from_bundler
|
||||
if ENV["JEKYLL_NO_BUNDLER_REQUIRE"]
|
||||
if ENV["JEKYLL_NO_BUNDLER_REQUIRE"] || !File.file?("Gemfile")
|
||||
false
|
||||
else
|
||||
require "bundler"
|
||||
required_gems = Bundler.require(:jekyll_plugins)
|
||||
Bundler.setup # puts all groups on the load path
|
||||
required_gems = Bundler.require(:jekyll_plugins) # requires the gems in this group only
|
||||
Jekyll.logger.debug("PluginManager:", "Required #{required_gems.map(&:name).join(', ')}")
|
||||
ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = "true"
|
||||
true
|
||||
|
|
Loading…
Reference in New Issue