always use JARS_SKIP when installing or updating plugins

Fixes #8058
This commit is contained in:
Joao Duarte 2017-08-23 16:05:21 +01:00 committed by João Duarte
parent cd6f5bf004
commit 2d44997a77
2 changed files with 4 additions and 4 deletions

View file

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

View file

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