mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Force the uninstall of a plugin at install or update time.
It can happen we want to update a plugin that is a dependency for an other plugin which will result in a warning and a manual action at uninstall phase of the install/update tasks Since we are 100% sure in these cases that the plugin will be installed again we can force the uninstall part not to alert us about it. This solves the issue we otherwise would get: Gem::DependencyRemovalException: Uninstallation aborted due to dependent gem(s) Fixes #2034
This commit is contained in:
parent
1e4c0288ea
commit
8be99c4302
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ class LogStash::PluginManager::Install < Clamp::Command
|
|||
|
||||
puts ("removing existing plugin before installation")
|
||||
::Gem.done_installing_hooks.clear
|
||||
::Gem::Uninstaller.new(gem_meta.name, {}).uninstall
|
||||
::Gem::Uninstaller.new(gem_meta.name, {:force => true}).uninstall
|
||||
end
|
||||
|
||||
::Gem.configuration.verbose = false
|
||||
|
|
|
@ -59,7 +59,7 @@ class LogStash::PluginManager::Update < Clamp::Command
|
|||
|
||||
if LogStash::PluginManager::Util.installed?(spec.name)
|
||||
::Gem.done_installing_hooks.clear
|
||||
::Gem::Uninstaller.new(gem_meta.name, {}).uninstall
|
||||
::Gem::Uninstaller.new(gem_meta.name, {:force => true}).uninstall
|
||||
end
|
||||
|
||||
::Gem.configuration.verbose = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue