diff options
author | Andre Arko <andre@arko.net> | 2014-07-15 16:56:09 +1000 |
---|---|---|
committer | Tim Moore <tmoore@incrementalism.net> | 2014-07-30 14:16:35 +1000 |
commit | 9af2172e6dc6b29dc24f92a27b7a385faa952ba3 (patch) | |
tree | b508b49005c72c5eb23d3792b8f6875b9e672b17 /lib/bundler/fetcher.rb | |
parent | 1a1b4dece5f6b8727b5b801afc7d4298cac2047e (diff) | |
download | bundler-9af2172e6dc6b29dc24f92a27b7a385faa952ba3.tar.gz |
Restore original Rubygems sources after fetching.
Diffstat (limited to 'lib/bundler/fetcher.rb')
-rw-r--r-- | lib/bundler/fetcher.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb index eb8ad253..d1ddc554 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -316,7 +316,8 @@ module Bundler # fetch from modern index: specs.4.8.gz def fetch_all_remote_specs - Bundler.rubygems.sources = ["#{@remote_uri}"] + old_sources = Bundler.rubygems.sources + Bundler.rubygems.sources = [@remote_uri.to_s] Bundler.rubygems.fetch_all_remote_specs rescue Gem::RemoteFetcher::FetchError, OpenSSL::SSL::SSLError => e case e.message @@ -330,6 +331,8 @@ module Bundler Bundler.ui.trace e raise HTTPError, "Could not fetch specs from #{uri}" end + ensure + Bundler.rubygems.sources = old_sources end def well_formed_dependency(name, *requirements) |