for newer versions of Bundler, store the runtime

This commit is contained in:
Mitchell Hashimoto 2015-07-09 22:12:47 -06:00
parent 931f0700b3
commit 479323f1e8
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ end
# then also initialize the paths to the plugins.
require "bundler"
begin
Bundler.setup(:default, :plugins)
$vagrant_bundler_runtime = Bundler.setup(:default, :plugins)
rescue Bundler::GemNotFound
$stderr.puts "Bundler, the underlying system used to manage Vagrant plugins,"
$stderr.puts "is reporting that a plugin or its dependency can't be found."

View File

@ -288,7 +288,7 @@ end
if Vagrant.plugins_enabled?
begin
global_logger.info("Loading plugins!")
Bundler.require(:plugins)
$vagrant_bundler_runtime.require(:plugins)
rescue Exception => e
raise Vagrant::Errors::PluginLoadError, message: e.to_s
end