Skip to content

Commit 28348fd

Browse files
committed
plugin clean: for safety, skip stubbed (uninstalled) gems
1 parent 4389f49 commit 28348fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/pluginmanager/clean.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class LogStash::PluginManager::Clean < LogStash::PluginManager::Command
2525
def execute
2626
locked_gem_names = ::Bundler::LockfileParser.new(File.read(LogStash::Environment::LOCKFILE)).specs.map(&:full_name).to_set
2727
orphan_gem_specs = ::Gem::Specification.each
28+
.reject(&:stubbed?) # skipped stubbed (uninstalled) gems
2829
.reject(&:default_gem?) # don't touch jruby-included default gems
2930
.reject{ |spec| locked_gem_names.include?(spec.full_name) }
3031
.sort

0 commit comments

Comments
 (0)