[rubygems/rubygems] Don't call #build_extensions at all if there are no extensions

5ecc0e0b31
This commit is contained in:
David Rodríguez 2022-07-15 21:32:35 +02:00 committed by git
parent d20886dd22
commit 14f52cfce5

View file

@ -25,7 +25,7 @@ module Bundler
extract_files
build_extensions
build_extensions if spec.extensions.any?
write_build_info_file
run_post_build_hooks
@ -81,14 +81,12 @@ module Bundler
else
require "shellwords" # compensate missing require in rubygems before version 3.2.25
super
if extension_dir.directory? # not made for gems without extensions
SharedHelpers.filesystem_access(extension_cache_path.parent, &:mkpath)
SharedHelpers.filesystem_access(extension_cache_path) do
FileUtils.cp_r extension_dir, extension_cache_path
end
end
end
end
def spec
if Bundler.rubygems.provides?("< 3.3.12") # RubyGems implementation rescues and re-raises errors before 3.3.12 and we don't want that