mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Ignore dependencies not actually locked from frozen check
Only needed if there can be no explicit global source (bundler < 3). https://github.com/rubygems/rubygems/commit/73923f4af5
This commit is contained in:
parent
30268d1de6
commit
0e60bc118b
2 changed files with 17 additions and 1 deletions
|
@ -379,7 +379,12 @@ module Bundler
|
||||||
|
|
||||||
both_sources = Hash.new {|h, k| h[k] = [] }
|
both_sources = Hash.new {|h, k| h[k] = [] }
|
||||||
@dependencies.each {|d| both_sources[d.name][0] = d }
|
@dependencies.each {|d| both_sources[d.name][0] = d }
|
||||||
locked_dependencies.each {|d| both_sources[d.name][1] = d }
|
|
||||||
|
locked_dependencies.each do |d|
|
||||||
|
next if !Bundler.feature_flag.bundler_3_mode? && @locked_specs[d.name].empty?
|
||||||
|
|
||||||
|
both_sources[d.name][1] = d
|
||||||
|
end
|
||||||
|
|
||||||
both_sources.each do |name, (dep, lock_dep)|
|
both_sources.each do |name, (dep, lock_dep)|
|
||||||
next if dep.nil? || lock_dep.nil?
|
next if dep.nil? || lock_dep.nil?
|
||||||
|
|
|
@ -258,6 +258,17 @@ RSpec.describe "install in deployment or frozen mode" do
|
||||||
expect(out).to eq("WIN")
|
expect(out).to eq("WIN")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "works if a gem is missing, but it's on a different platform, and the Gemfile has no global source", :bundler => "< 3" do
|
||||||
|
install_gemfile <<-G
|
||||||
|
source "#{file_uri_for(gem_repo1)}" do
|
||||||
|
gem "rake", platform: :#{not_local_tag}
|
||||||
|
end
|
||||||
|
G
|
||||||
|
|
||||||
|
bundle :install, :env => { "BUNDLE_FROZEN" => "true" }
|
||||||
|
expect(last_command).to be_success
|
||||||
|
end
|
||||||
|
|
||||||
it "explodes if a path gem is missing" do
|
it "explodes if a path gem is missing" do
|
||||||
build_lib "path_gem"
|
build_lib "path_gem"
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
|
|
Loading…
Reference in a new issue