From 2d44997a7759ad3eb8f72e97f1f275a9b63142d6 Mon Sep 17 00:00:00 2001 From: Joao Duarte Date: Wed, 23 Aug 2017 16:05:21 +0100 Subject: [PATCH] always use JARS_SKIP when installing or updating plugins Fixes #8058 --- lib/pluginmanager/install.rb | 5 +++-- lib/pluginmanager/update.rb | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pluginmanager/install.rb b/lib/pluginmanager/install.rb index 476b00ec7..388c99557 100644 --- a/lib/pluginmanager/install.rb +++ b/lib/pluginmanager/install.rb @@ -20,8 +20,9 @@ class LogStash::PluginManager::Install < LogStash::PluginManager::Command # but the argument parsing does not support it for now so currently if specifying --version only # one plugin name can be also specified. def execute - # Turn off any jar dependencies lookup when running with `--local` - ENV["JARS_SKIP"] = "true" if local? + # we never want to lookup jars or touch the ~/.m2 directory + # all plugins that use gems ship them inside the .gem + ENV["JARS_SKIP"] = "true" # This is a special flow for PACK related plugins, # if we dont detect an pack we will just use the normal `Bundle install` Strategy` diff --git a/lib/pluginmanager/update.rb b/lib/pluginmanager/update.rb index 583b6c954..cc0ffadc1 100644 --- a/lib/pluginmanager/update.rb +++ b/lib/pluginmanager/update.rb @@ -14,8 +14,7 @@ class LogStash::PluginManager::Update < LogStash::PluginManager::Command option "--local", :flag, "force local-only plugin update. see bin/logstash-plugin package|unpack", :default => false def execute - # Turn off any jar dependencies lookup when running with `--local` - ENV["JARS_SKIP"] = "true" if local? + ENV["JARS_SKIP"] = "true" # remove "system" local gems used by LS local_gems = gemfile.locally_installed_gems.map(&:name) - NON_PLUGIN_LOCAL_GEMS