lib/kontena/cli/plugins/install_command.rb in kontena-cli-1.3.0 vs lib/kontena/cli/plugins/install_command.rb in kontena-cli-1.3.1.rc1
- old
+ new
@@ -12,31 +12,19 @@
def execute
installed_version = Kontena::PluginManager.instance.installed(name)
if installed_version
- installed = spinner "Upgrading plugin #{name.colorize(:cyan)}" do |spin|
- begin
- Kontena::PluginManager.instance.upgrade_plugin(name, pre: pre?)
- rescue => ex
- $stderr.puts pastel.red("#{ex.class.name} : #{ex.message}")
- logger.error(ex)
- spin.fail!
- end
+ installed = spinner "Upgrading plugin #{name.colorize(:cyan)}" do
+ Kontena::PluginManager.instance.upgrade_plugin(name, pre: pre?)
end
- spinner "Running cleanup" do |spin|
+ spinner "Running cleanup" do
Kontena::PluginManager.instance.cleanup_plugin(name)
end
else
- installed = spinner "Installing plugin #{name.colorize(:cyan)}" do |spin|
- begin
- Kontena::PluginManager.instance.install_plugin(name, pre: pre?, version: version)
- rescue => ex
- $stderr.puts pastel.red("#{ex.class.name} : #{ex.message}")
- logger.error(ex)
- spin.fail!
- end
+ installed = spinner "Installing plugin #{name.colorize(:cyan)}" do
+ Kontena::PluginManager.instance.install_plugin(name, pre: pre?, version: version)
end
end
Array(installed).each do |gem|
if gem.name.start_with?('kontena-plugin-')