Skip to content

Commit 9e5cc7d

Browse files
andseljsvd
andauthored
Retrieve logstash-core gem's path using inline bundler (#218)
Avoid to fork a bundler process to extract logstash-core's path and use the same bundler that wraps the execution of the Rakefile itself. Co-authored-by: João Duarte <[email protected]>
1 parent e05a63b commit 9e5cc7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ end
2121
def delete_create_gradle_properties
2222
root_dir = File.dirname(__FILE__)
2323
gradle_properties_file = "#{root_dir}/gradle.properties"
24-
lsc_path = `bundle show logstash-core`
25-
lsce_path = `bundle show logstash-core-event`
24+
# find the path to the logstash-core gem
25+
lsc_path = Bundler.rubygems.find_name("logstash-core").first.full_gem_path
2626
FileUtils.rm_f(gradle_properties_file)
2727
File.open(gradle_properties_file, "w") do |f|
2828
f.puts "logstashCoreGemPath=#{lsc_path}"

0 commit comments

Comments
 (0)