mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
environment when not in package context
remove unused constants
This commit is contained in:
parent
07b6f4533c
commit
af4cdb6be2
1 changed files with 2 additions and 5 deletions
|
@ -6,16 +6,13 @@ module LogStash
|
|||
extend self
|
||||
|
||||
# rehydrate the bootstrap environment if the startup was not done by executing bootstrap.rb
|
||||
unless LogStash::Environment.const_defined?("LOGSTASH_HOME")
|
||||
abort("ERROR: missing LOGSTASH_HOME environment variable") if ENV["LOGSTASH_HOME"].to_s.empty?
|
||||
# and we are in the context of the logstash package
|
||||
if !LogStash::Environment.const_defined?("LOGSTASH_HOME") && !ENV["LOGSTASH_HOME"].to_s.empty?
|
||||
$LOAD_PATH << ::File.join(ENV["LOGSTASH_HOME"], "lib")
|
||||
require "bootstrap/environment"
|
||||
end
|
||||
|
||||
LOGSTASH_CORE = ::File.expand_path(::File.join(::File.dirname(__FILE__), "..", ".."))
|
||||
BUNDLE_CONFIG_PATH = ::File.join(LOGSTASH_HOME, ".bundle", "config")
|
||||
BOOTSTRAP_GEM_PATH = ::File.join(LOGSTASH_HOME, 'build', 'bootstrap')
|
||||
|
||||
LOGSTASH_ENV = (ENV["LS_ENV"] || 'production').to_s.freeze
|
||||
|
||||
def env
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue