Skip to content

Commit 744b354

Browse files
If name is to be unlocked, we can skip converging the spec
1 parent dd5d15f commit 744b354

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bundler/lib/bundler/definition.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,8 @@ def converge_specs(specs)
10361036

10371037
specs.each do |s|
10381038
name = s.name
1039+
next if @gems_to_unlock.include?(name)
1040+
10391041
dep = @dependencies.find {|d| s.satisfies?(d) }
10401042
lockfile_source = s.source
10411043

@@ -1054,7 +1056,7 @@ def converge_specs(specs)
10541056
next if @sources_to_unlock.include?(source.name)
10551057

10561058
# Path sources have special logic
1057-
if source.instance_of?(Source::Path) || source.instance_of?(Source::Gemspec) || (source.instance_of?(Source::Git) && !@gems_to_unlock.include?(name) && deps.include?(dep))
1059+
if source.instance_of?(Source::Path) || source.instance_of?(Source::Gemspec) || (source.instance_of?(Source::Git) && deps.include?(dep))
10581060
new_spec = source.specs[s].first
10591061
if new_spec
10601062
s.runtime_dependencies.replace(new_spec.runtime_dependencies)

0 commit comments

Comments
 (0)