Modify the way we fetch the installed version of the plugin

Fixes #2025

Fixes #2063
This commit is contained in:
Richard Pijnenburg 2014-11-12 13:11:59 +00:00 committed by Jordan Sissel
parent c1018129f4
commit ab71a674ba

View file

@ -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