Skip to content

Commit

Permalink
[rubygems/rubygems] Move lockfile_source variable out of condition …
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Aug 16, 2023
1 parent 6bc63ab commit 002165f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bundler/definition.rb
Expand Up @@ -811,18 +811,18 @@ def converge_specs(specs)

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)
Expand Down

0 comments on commit 002165f

Please sign in to comment.