diff options
author | Jeremy Weathers <jeremy@codekindly.com> | 2018-11-16 17:08:49 -0600 |
---|---|---|
committer | Jeremy Weathers <jeremy@codekindly.com> | 2018-11-16 17:11:03 -0600 |
commit | 67320924db1f1910b17fae0a9268b02077874d26 (patch) | |
tree | fcc04815acb3e19e30dfee6d2165e4e93afcd6fe | |
parent | 98040394795a8e5fd03d7e893f1a060041cd6777 (diff) | |
download | bundler-67320924db1f1910b17fae0a9268b02077874d26.tar.gz |
Fix multiple source warning messages from `error` to `warn`
-rw-r--r-- | lib/bundler/cli/install.rb | 17 | ||||
-rw-r--r-- | lib/bundler/resolver.rb | 2 |
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index b40e5f0e9e..03edc7fbd2 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -202,15 +202,16 @@ module Bundler end def warn_ambiguous_gems + # TODO: remove this when we drop Bundler 1.x support Installer.ambiguous_gems.to_a.each do |name, installed_from_uri, *also_found_in_uris| - Bundler.ui.error "Warning: the gem '#{name}' was found in multiple sources." - Bundler.ui.error "Installed from: #{installed_from_uri}" - Bundler.ui.error "Also found in:" - also_found_in_uris.each {|uri| Bundler.ui.error " * #{uri}" } - Bundler.ui.error "You should add a source requirement to restrict this gem to your preferred source." - Bundler.ui.error "For example:" - Bundler.ui.error " gem '#{name}', :source => '#{installed_from_uri}'" - Bundler.ui.error "Then uninstall the gem '#{name}' (or delete all bundled gems) and then install again." + Bundler.ui.warn "Warning: the gem '#{name}' was found in multiple sources." + Bundler.ui.warn "Installed from: #{installed_from_uri}" + Bundler.ui.warn "Also found in:" + also_found_in_uris.each {|uri| Bundler.ui.warn " * #{uri}" } + Bundler.ui.warn "You should add a source requirement to restrict this gem to your preferred source." + Bundler.ui.warn "For example:" + Bundler.ui.warn " gem '#{name}', :source => '#{installed_from_uri}'" + Bundler.ui.warn "Then uninstall the gem '#{name}' (or delete all bundled gems) and then install again." end end end diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb index fac28ced90..aaa7bb7583 100644 --- a/lib/bundler/resolver.rb +++ b/lib/bundler/resolver.rb @@ -414,7 +414,7 @@ module Bundler msg = msg.join("\n") raise SecurityError, msg if multisource_disabled - Bundler.ui.error "Warning: #{msg}" + Bundler.ui.warn "Warning: #{msg}" end end end |