Skip to content

Instantly share code, notes, and snippets.

@slyphon
Created January 18, 2012 01:29
Show Gist options
  • Save slyphon/76b401c35dd951253f8e to your computer and use it in GitHub Desktop.
Save slyphon/76b401c35dd951253f8e to your computer and use it in GitHub Desktop.
diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb
index 9cd32f5..86e8ca0 100644
--- a/lib/rubygems/indexer.rb
+++ b/lib/rubygems/indexer.rb
@@ -584,6 +584,10 @@ class Gem::Indexer
end
specs = map_gems_to_specs updated_gems
+
+ Gem::Specification.dirs = []
+ Gem::Specification.add_specs(*specs)
+
prerelease, released = specs.partition { |s| s.version.prerelease? }
files = build_marshal_gemspecs
@@ -622,6 +626,9 @@ class Gem::Indexer
File.utime newest_mtime, newest_mtime, dst_name
end
+ rescue SignalException
+ ensure
+ FileUtils.rm_rf @directory
end
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment