[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 extract_files
build_extensions build_extensions if spec.extensions.any?
write_build_info_file write_build_info_file
run_post_build_hooks run_post_build_hooks
@ -81,11 +81,9 @@ module Bundler
else else
require "shellwords" # compensate missing require in rubygems before version 3.2.25 require "shellwords" # compensate missing require in rubygems before version 3.2.25
super 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.parent, &:mkpath) SharedHelpers.filesystem_access(extension_cache_path) do
SharedHelpers.filesystem_access(extension_cache_path) do FileUtils.cp_r extension_dir, extension_cache_path
FileUtils.cp_r extension_dir, extension_cache_path
end
end end
end end
end end