friendly errors if a non-existent gem install is tried
This commit is contained in:
parent
fe8842c795
commit
eabc0f04fa
|
@ -428,6 +428,10 @@ module Vagrant
|
|||
error_key(:plugin_gem_error)
|
||||
end
|
||||
|
||||
class PluginGemNotFound < VagrantError
|
||||
error_key(:plugin_gem_not_found)
|
||||
end
|
||||
|
||||
class PluginInstallBadEntryPoint < VagrantError
|
||||
error_key(:plugin_install_bad_entry_point)
|
||||
end
|
||||
|
|
|
@ -40,6 +40,8 @@ module Vagrant
|
|||
@global_file.add_plugin(result.name)
|
||||
|
||||
result
|
||||
rescue ::Bundler::GemNotFound
|
||||
raise Errors::PluginGemNotFound, name: name
|
||||
end
|
||||
|
||||
# Uninstalls the plugin with the given name.
|
||||
|
|
|
@ -474,6 +474,9 @@ en:
|
|||
manage Vagrant plugins. The output of the errors are shown below:
|
||||
|
||||
%{output}
|
||||
plugin_gem_not_found: |-
|
||||
The plugin '%{name}' could not be installed because it could not
|
||||
be found. Please double check the name and try again.
|
||||
plugin_install_bad_entry_point: |-
|
||||
Attempting to load the plugin '%{name}' failed, because
|
||||
the entry point doesn't exist. The entry point attempted was
|
||||
|
|
Loading…
Reference in New Issue