Allow plugin_init_error to provide all information. Include final reset on specifications.

This commit is contained in:
Chris Roberts 2016-11-17 16:40:51 -08:00
parent 23b40a31ed
commit 53b9f1747c
2 changed files with 12 additions and 13 deletions

View File

@ -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

View File

@ -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