Allow copying a release template for Gemfile.jruby-1.9.lock.release

Fixes #6985
This commit is contained in:
Armin Braun 2017-04-28 08:53:04 +02:00
parent b72b167161
commit 22af03a26a

View file

@ -102,6 +102,11 @@ module LogStash
::File.join(ENV["LOGSTASH_HOME"], "Gemfile.template"), Environment::GEMFILE_PATH
)
end
# create Gemfile.jruby-1.9.lock from template iff a template exists it itself does not exist
lock_template = ::File.join(ENV["LOGSTASH_HOME"], "Gemfile.jruby-1.9.lock.release")
if File.exists?(lock_template) && !::File.exists?(Environment::LOCKFILE)
::FileUtils.copy(lock_template, Environment::LOCKFILE)
end
LogStash::Bundler.patch!