Do not clean unused gems after updating gems

The are a difference between the gems installed and the available spec
loaded in memory making bundler remove the gem that we have just
updated.

Fixes: #6339

Fixes #6340
This commit is contained in:
Pier-Hugues Pellerin 2016-12-01 16:19:54 -05:00
parent 1280eb29e6
commit 697b05f785

View file

@ -62,7 +62,9 @@ class LogStash::PluginManager::Update < LogStash::PluginManager::Command
options = {:update => plugins, :rubygems_source => gemfile.gemset.sources}
options[:local] = true if local?
output = LogStash::Bundler.invoke!(options)
output = LogStash::Bundler.invoke!(:clean => true)
# We currently dont removed unused gems from the logstash installation
# see: https://github.com/elastic/logstash/issues/6339
# output = LogStash::Bundler.invoke!(:clean => true)
display_updated_plugins(previous_gem_specs_map)
rescue => exception
gemfile.restore!