diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-05-09 11:08:30 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-05-09 12:57:12 +0900 |
commit | 59646e87983ff7ab04a8eccd92e789d77f4402ed (patch) | |
tree | d0280cc12e705af953f773887b65d50895c436dd /tool/lib | |
parent | bb75e83d9f22c10b8893f3ff20fdd1d8d1825caf (diff) |
Allow to use development version of bundled gems for packaging
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7781
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/bundled_gem.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/lib/bundled_gem.rb b/tool/lib/bundled_gem.rb index d24720b8c2..bfc0be1c81 100644 --- a/tool/lib/bundled_gem.rb +++ b/tool/lib/bundled_gem.rb @@ -12,6 +12,12 @@ module BundledGem pkg = Gem::Package.new(file) prepare_test(pkg.spec, *rest) {|dir| pkg.extract_files(dir)} puts "Unpacked #{file}" + rescue Gem::Package::FormatError, Errno::ENOENT + puts "Try with hash version of bundled gems instead of #{file}. We don't use this gem with release version of Ruby." + if file =~ /^gems\/(\w+)-/ + file = Dir.glob("gems/#{$1}-*.gem").first + end + retry end def build(gemspec, version, outdir = ".", validation: true) |