From 53b9f1747cfeff9c73d82c1222da21f0d0e28488 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 17 Nov 2016 16:40:51 -0800 Subject: [PATCH] Allow plugin_init_error to provide all information. Include final reset on specifications. --- lib/vagrant/bundler.rb | 12 +++--------- templates/locales/en.yml | 13 +++++++++---- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb index 74941b100..bca00e947 100644 --- a/lib/vagrant/bundler.rb +++ b/lib/vagrant/bundler.rb @@ -63,15 +63,7 @@ module Vagrant @init_retried = true retry else - @logger.debug("#{failure.class}: #{failure}") - $stderr.puts "Vagrant failed to properly initialize due to an error while" - $stderr.puts "while attempting to load configured plugins. This can be caused" - $stderr.puts "by manually tampering with the 'plugins.json' file, or by a" - $stderr.puts "recent Vagrant upgrade. To fix this problem, please run:\n\n" - $stderr.puts " vagrant plugin repair\n\n" - $stderr.puts "The error message is shown below:\n\n" - $stderr.puts failure.message - exit 1 + raise end end @@ -89,6 +81,8 @@ module Vagrant Gem.post_reset do Gem::Specification.all = full_vagrant_spec_list end + + Gem::Specification.reset end # Removes any temporary files created by init diff --git a/templates/locales/en.yml b/templates/locales/en.yml index a30cb0e33..6523fd0ad 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -983,10 +983,15 @@ en: %{conflicts} plugin_init_error: |- - The plugins failed to initialize correctly. If Vagrant was recently - updated, this error may be due to incompatible versions of dependencies. - To fix this problem please remove and re-install all plugins. Vagrant can - attempt to do this automatically by running: + The plugins failed to initialize correctly. This may be due to manual + modifications made within the Vagrant home directory. Vagrant can + attempt to automatically correct this issue by running: + + vagrant plugin repair + + If Vagrant was recently updated, this error may be due to incompatible + versions of dependencies. To fix this problem please remove and re-install + all plugins. Vagrant can attempt to do this automatically by running: vagrant plugin expunge --reinstall