diff options
author | David RodrÃguez <[email protected]> | 2024-06-18 13:49:31 +0200 |
---|---|---|
committer | git <[email protected]> | 2024-06-20 07:15:06 +0000 |
commit | f7acfeb4ce9ad5235cd6e3d5a709c0dd0096b863 (patch) | |
tree | 2f795aa6929b346d5fcc74fcb35eede013383254 /lib/bundler/source | |
parent | bf6b8dd6a82b673e89c8931c6c99e64395bbaab2 (diff) |
[rubygems/rubygems] Fix credentials being readded when re-resolving without a full unlock
https://github.com/rubygems/rubygems/commit/a8670e43f8
Diffstat (limited to 'lib/bundler/source')
-rw-r--r-- | lib/bundler/source/rubygems.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 2dfa936cfc..df458629df 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -10,7 +10,7 @@ module Bundler # Ask for X gems per API request API_REQUEST_SIZE = 50 - attr_reader :remotes + attr_accessor :remotes def initialize(options = {}) @options = options @@ -20,9 +20,10 @@ module Bundler @allow_cached = false @allow_local = options["allow_local"] || false @checksum_store = Checksum::Store.new - @original_remotes = nil Array(options["remotes"]).reverse_each {|r| add_remote(r) } + + @lockfile_remotes = @remotes if options["from_lockfile"] end def caches @@ -92,12 +93,7 @@ module Bundler def self.from_lock(options) options["remotes"] = Array(options.delete("remote")).reverse - new(options) - end - - def remotes=(new_remotes) - @original_remotes = @remotes - @remotes = new_remotes + new(options.merge("from_lockfile" => true)) end def to_lock @@ -470,7 +466,7 @@ module Bundler private def lockfile_remotes - @original_remotes || credless_remotes + @lockfile_remotes || credless_remotes end # Checks if the requested spec exists in the global cache. If it does, |