mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Fix the update command to only work with installed plugins gems so it's not having problems with not purged plugins
Fixes #3731
This commit is contained in:
parent
705ca73939
commit
a3fc9476cc
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ class LogStash::PluginManager::Update < LogStash::PluginManager::Command
|
||||||
# retrieve only the latest spec for all locally installed plugins
|
# retrieve only the latest spec for all locally installed plugins
|
||||||
# @return [Hash] result hash {plugin_name.downcase => plugin_spec}
|
# @return [Hash] result hash {plugin_name.downcase => plugin_spec}
|
||||||
def find_latest_gem_specs
|
def find_latest_gem_specs
|
||||||
LogStash::PluginManager.find_plugins_gem_specs.inject({}) do |result, spec|
|
LogStash::PluginManager.all_installed_plugins_gem_specs(gemfile).inject({}) do |result, spec|
|
||||||
previous = result[spec.name.downcase]
|
previous = result[spec.name.downcase]
|
||||||
result[spec.name.downcase] = previous ? [previous, spec].max_by{|s| s.version} : spec
|
result[spec.name.downcase] = previous ? [previous, spec].max_by{|s| s.version} : spec
|
||||||
result
|
result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue