mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
set BUNDLE_PATH env to overwrite any .bundler/config and fix Bundler.setup
Fixes #2449
This commit is contained in:
parent
890c1bc3eb
commit
21270a2e07
1 changed files with 2 additions and 1 deletions
|
@ -56,13 +56,14 @@ module LogStash
|
|||
# the bootstrap gems are required specificly for bundler which is a runtime dependency
|
||||
# of some plugins dependedant gems.
|
||||
def set_gem_paths!
|
||||
ENV["GEM_HOME"] = ENV["GEM_PATH"] = logstash_gem_home
|
||||
ENV["GEM_PATH"] = ENV["BUNDLE_PATH"] = logstash_gem_home
|
||||
ENV["BUNDLE_GEMFILE"] = GEMFILE_PATH unless ENV['BUNDLE_GEMFILE']
|
||||
|
||||
require 'bundler'
|
||||
require 'logstash/bundler_patch'
|
||||
|
||||
Bundler.setup
|
||||
ENV["GEM_HOME"] = ENV["GEM_PATH"] = logstash_gem_home
|
||||
|
||||
# Bundler.setup will wipe the existing $LOAD_PATH.
|
||||
# Since we are using gems not declared in the gemfile we need to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue