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)
|
error_key(:plugin_gem_error)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class PluginGemNotFound < VagrantError
|
||||||
|
error_key(:plugin_gem_not_found)
|
||||||
|
end
|
||||||
|
|
||||||
class PluginInstallBadEntryPoint < VagrantError
|
class PluginInstallBadEntryPoint < VagrantError
|
||||||
error_key(:plugin_install_bad_entry_point)
|
error_key(:plugin_install_bad_entry_point)
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,6 +40,8 @@ module Vagrant
|
||||||
@global_file.add_plugin(result.name)
|
@global_file.add_plugin(result.name)
|
||||||
|
|
||||||
result
|
result
|
||||||
|
rescue ::Bundler::GemNotFound
|
||||||
|
raise Errors::PluginGemNotFound, name: name
|
||||||
end
|
end
|
||||||
|
|
||||||
# Uninstalls the plugin with the given name.
|
# Uninstalls the plugin with the given name.
|
||||||
|
|
|
@ -474,6 +474,9 @@ en:
|
||||||
manage Vagrant plugins. The output of the errors are shown below:
|
manage Vagrant plugins. The output of the errors are shown below:
|
||||||
|
|
||||||
%{output}
|
%{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: |-
|
plugin_install_bad_entry_point: |-
|
||||||
Attempting to load the plugin '%{name}' failed, because
|
Attempting to load the plugin '%{name}' failed, because
|
||||||
the entry point doesn't exist. The entry point attempted was
|
the entry point doesn't exist. The entry point attempted was
|
||||||
|
|
Loading…
Reference in New Issue