method
check_primary_source_safety

v2_6_3 -
Show latest stable
-
0 notes -
Class: Dsl
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
check_primary_source_safety(source_list)
private
Hide source
# File lib/bundler/dsl.rb, line 470 def check_primary_source_safety(source_list) return if source_list.rubygems_primary_remotes.empty? && source_list.global_rubygems_source.nil? if Bundler.feature_flag.disable_multisource? msg = "This Gemfile contains multiple primary sources. " "Each source after the first must include a block to indicate which gems " "should come from that source" unless Bundler.feature_flag.bundler_2_mode? msg += ". To downgrade this error to a warning, run " "`bundle config --delete disable_multisource`" end raise GemfileEvalError, msg else Bundler::SharedHelpers.major_deprecation 2, "Your Gemfile contains multiple primary sources. " "Using `source` more than once without a block is a security risk, and " "may result in installing unexpected gems. To resolve this warning, use " "a block to indicate which gems should come from the secondary source. " "To upgrade this warning to an error, run `bundle config " "disable_multisource true`." end end