Skip to content

Commit

Permalink
Use gemspec that keeps original dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Mar 27, 2023
1 parent 9b7a7e9 commit 3eea859
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tool/rbinstall.rb
Expand Up @@ -1027,9 +1027,12 @@ def install_default_gem(dir, srcdir, bindir)
next if /^\s*(?:#|$)/ =~ name
next unless /^(\S+)\s+(\S+).*/ =~ name
gem_name = "#$1-#$2"
path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
# Try to find the gemspec file for C ext gems
# ex .bundle/gems/debug-1.7.1/debug-1.7.1.gemspec
# This gemspec keep the original dependencies
path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
unless File.exist?(path)
path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
unless File.exist?(path)
skipped[gem_name] = "gemspec not found"
next
Expand Down

0 comments on commit 3eea859

Please sign in to comment.