Matt Brennan aed61e36b3 [ruby/rubygems] Remove partial git checkout when submodule update fails
If `git submodule update` fails after `git reset --hard` has populated
the destination, `GitProxy#installed_to?` considers the half-finished
checkout installed. When the error is rescued during `missing_specs?`,
the subsequent resolve then skips the checkout, never builds native
extensions, and `bundle install` exits successfully.

Remove the destination when `git reset --hard` or the submodule step
after it fails, before re-raising, so the next attempt checks out again
and the error reaches the user. A failed `reset --hard` can leave a
partially written tree that `installed_to?` would misjudge the same way.

https://github.com/ruby/rubygems/commit/cf89bb0c8c

Co-authored-by: AI (Pi/Claude Fable 5.1) <noreply@pi.dev>
2026-11-05 16:52:56 +00:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…