diff --git a/tool/fetch-bundled_gems.rb b/tool/fetch-bundled_gems.rb index c2a1c0b700..5769a19b37 100755 --- a/tool/fetch-bundled_gems.rb +++ b/tool/fetch-bundled_gems.rb @@ -26,4 +26,8 @@ else puts "retrieving #{n} ..." system(*%W"git clone #{u} #{n}") or abort end -system(*%W"git checkout #{v}", chdir: n) or abort +unless system(*%W"git checkout #{v}", chdir: n) + unless v.sub!(/\Av/, '') and system(*%W"git checkout #{v}", chdir: n) + abort + end +end