mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
We need to call bundler_setup!
before getting the list of the installed gems if we want to support the :path and :git option in the gemfile
Fixes #2732
This commit is contained in:
parent
d44b58bcdc
commit
d98f2b45cb
2 changed files with 5 additions and 2 deletions
|
@ -94,8 +94,8 @@ module LogStash
|
|||
options = {:without => [:development]}.merge(options)
|
||||
options[:without] = Array(options[:without])
|
||||
# make sure we use our own nicely installed bundler and not a rogue, bad, mean, ugly, stupid other bundler. bad bundler, bad bad bundler go away.
|
||||
Gem.clear_paths
|
||||
Gem.paths = ENV['GEM_HOME'] = ENV['GEM_PATH'] = logstash_gem_home
|
||||
::Gem.clear_paths
|
||||
::Gem.paths = ENV['GEM_HOME'] = ENV['GEM_PATH'] = logstash_gem_home
|
||||
|
||||
# set BUNDLE_GEMFILE ENV before requiring bundler to avoid bundler recurse and load unrelated Gemfile(s)
|
||||
ENV["BUNDLE_GEMFILE"] = LogStash::Environment::GEMFILE_PATH
|
||||
|
|
|
@ -15,6 +15,9 @@ class LogStash::PluginManager::List < Clamp::Command
|
|||
end
|
||||
|
||||
def execute
|
||||
require 'logstash/environment'
|
||||
LogStash::Environment.bundler_setup!
|
||||
|
||||
Gem.configuration.verbose = false
|
||||
|
||||
gemfile = LogStash::Gemfile.new(File.new(LogStash::Environment::GEMFILE_PATH, "r+")).load
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue