Skip to content

Commit

Permalink
[core] Remove bundler usage for plugin management
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroberts committed Nov 8, 2016
1 parent dbbd2d8 commit 1fb4553
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 376 deletions.
12 changes: 0 additions & 12 deletions bin/vagrant
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ argv.each_index do |i|
end
end

# First, make sure that we're executing using the proper Bundler context
# with our plugins. If we're not, then load that and reload Vagrant.
if !ENV["VAGRANT_INTERNAL_BUNDLERIZED"]
require "rbconfig"
ruby_path = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["ruby_install_name"])
Kernel.exec(
ruby_path,
File.expand_path("../../lib/vagrant/pre-rubygems.rb", __FILE__),
*ARGV)
raise "Fatal error: this line should never be reached"
end

# Set logging level to `debug`. This is done before loading 'vagrant', as it
# sets up the logging system.
if argv.include?("--debug")
Expand Down
6 changes: 5 additions & 1 deletion lib/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
global_logger.info(" - #{spec.name} = #{spec.version}")
end


# We need these components always so instead of an autoload we
# just require them explicitly here.
require "vagrant/plugin"
Expand Down Expand Up @@ -254,6 +253,11 @@ def self.original_env
I18n.config.enforce_available_locales = true
end

# Setup the plugin manager and load any defined plugins
require_relative "vagrant/plugin/manager"
plugins = Vagrant::Plugin::Manager.instance.installed_plugins
Vagrant::Bundler.instance.init!(plugins)

# A lambda that knows how to load plugins from a single directory.
plugin_load_proc = lambda do |directory|
# We only care about directories
Expand Down
Loading

0 comments on commit 1fb4553

Please sign in to comment.