core: log plugins and their versions

/cc tmatilai - Bundler makes it nice and easy.
This commit is contained in:
Mitchell Hashimoto 2014-01-08 20:04:57 -08:00
parent b9e701f853
commit 62028b2df3
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,11 @@ global_logger.info("RubyGems version: #{Gem::VERSION}")
ENV.each do |k, v|
global_logger.info("#{k}=#{v.inspect}") if k =~ /^VAGRANT_/
end
global_logger.info("Plugins:")
Bundler.definition.specs_for([:plugins]).each do |spec|
global_logger.info(" - #{spec.name} = #{spec.version}")
end
# We need these components always so instead of an autoload we
# just require them explicitly here.
@ -264,6 +269,7 @@ end
# If we have plugins enabled, then load those
if Vagrant.plugins_enabled?
begin
global_logger.info("Loading plugins!")
Bundler.require(:plugins)
rescue Exception => e
raise Vagrant::Errors::PluginLoadError, message: e.to_s