diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-07-12 12:38:44 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-08-16 15:03:38 +0900 |
commit | 002165f8fec925740330e62984e28fcc0eb53ce1 (patch) | |
tree | 39c7960bf6fd51d42e7debca74f09e4b8567760d /lib/bundler/definition.rb | |
parent | 6bc63ab9bb3828a59e2c87619922a33bf6b27da3 (diff) |
[rubygems/rubygems] Move `lockfile_source` variable out of condition branch
https://github.com/rubygems/rubygems/commit/efebc64250
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r-- | lib/bundler/definition.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 5d3931e2b7..c20e440a56 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -811,18 +811,18 @@ module Bundler specs.each do |s| dep = @dependencies.find {|d| s.satisfies?(d) } + lockfile_source = s.source # Replace the locked dependency's source with the equivalent source from the Gemfile s.source = if dep gemfile_source = dep.source || sources.default_source - lockfile_source = s.source @specs_that_changed_sources << s if gemfile_source != lockfile_source deps << dep if !dep.source || lockfile_source.include?(dep.source) gemfile_source else - sources.get_with_fallback(s.source) + sources.get_with_fallback(lockfile_source) end next if @unlock[:sources].include?(s.source.name) |