diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-02-09 14:36:38 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-02-09 14:40:12 +0900 |
commit | 007c75ce4c66243e41144c6977e5ccbf4ab71c93 (patch) | |
tree | 21187d2e9a7e647af02e962856458d160b35a698 /tool | |
parent | 33c1e082d0807db403a2d93cbf0a094c91179d74 (diff) |
Skip to install bundled gems that is C extension and build failed.
Ex. We can't build syslog gem in Windows platform. We should skip install
syslog as bundled gems.
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 2dbc4e9e5b..1001d5a640 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -1061,6 +1061,11 @@ install?(:ext, :comm, :gem, :'bundled-gems') do skipped[gem_name] = "full name unmatch #{spec.full_name}" next end + # Skip install C ext bundled gem if it is build failed or not found + if !spec.extensions.empty? && !File.exist?("#{build_dir}/#{gem_name}/gem.build_complete") + skipped[gem_name] = "extensions not found or build failed #{spec.full_name}" + next + end spec.extension_dir = "#{extensions_dir}/#{spec.full_name}" package = RbInstall::DirPackage.new spec ins = RbInstall::UnpackedInstaller.new(package, options) |