From ab71a674bac6df1b9edcbf1b555f12c5dbb4890d Mon Sep 17 00:00:00 2001 From: Richard Pijnenburg Date: Wed, 12 Nov 2014 13:11:59 +0000 Subject: [PATCH] Modify the way we fetch the installed version of the plugin Fixes #2025 Fixes #2063 --- lib/logstash/pluginmanager/install.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/logstash/pluginmanager/install.rb b/lib/logstash/pluginmanager/install.rb index c7c1f15e7..cedbab324 100644 --- a/lib/logstash/pluginmanager/install.rb +++ b/lib/logstash/pluginmanager/install.rb @@ -58,8 +58,9 @@ class LogStash::PluginManager::Install < Clamp::Command options[:document] = [] inst = Gem::DependencyInstaller.new(options) inst.install plugin, version - specs, _ = inst.installed_gems - puts ("Successfully installed '#{specs.name}' with version '#{specs.version}'") + specs = inst.installed_gems + specs.reject! { |gemspec| gemspec.name != gem_meta.name } + puts ("Successfully installed '#{specs.first.name}' with version '#{specs.first.version}'") return 0 end