mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Make sure we setup the gem environment before finding the currently installed gems
Fixes #3063
This commit is contained in:
parent
ba00a3805c
commit
6b671400cc
1 changed files with 1 additions and 0 deletions
|
@ -95,6 +95,7 @@ class LogStash::PluginManager::Update < LogStash::PluginManager::Command
|
|||
# retrieve only the latest spec for all locally installed plugins
|
||||
# @return [Hash] result hash {plugin_name.downcase => plugin_spec}
|
||||
def find_latest_gem_specs
|
||||
LogStash::Bundler.setup!
|
||||
LogStash::PluginManager.find_plugins_gem_specs.inject({}) do |result, spec|
|
||||
previous = result[spec.name.downcase]
|
||||
result[spec.name.downcase] = previous ? [previous, spec].max_by{|s| s.version} : spec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue