From f8bcba55960cf8067995c61086949e16f63a857f Mon Sep 17 00:00:00 2001 From: Justin Collins Date: Fri, 18 Oct 2024 09:50:18 -0600 Subject: [PATCH] Remove bundled directories with native extensions --- build.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rb b/build.rb index 189e5cf6c..90d8b4115 100755 --- a/build.rb +++ b/build.rb @@ -16,7 +16,9 @@ f.puts "path = File.expand_path('../..', __FILE__)" Dir["bundle/ruby/**/lib"].each do |dir| - unless bundle_exclude.any? { |gem_name| dir.include? gem_name } + if bundle_exclude.any? { |gem_name| dir.include? gem_name } + FileUtils.rm_rf(File.expand_path('..', dir)) + else f.puts %Q[$:.unshift "\#{path}/#{dir}"] end end