summaryrefslogtreecommitdiff
path: root/lib/rubygems/command.rb
diff options
context:
space:
mode:
authorbronzdoc <lsagastume1990@gmail.com>2019-07-25 23:54:06 -0600
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 07:35:48 +0900
commit89ad5df979727ab50eee6106550bf58b1888486e (patch)
tree4b5d80d208686fc25deb39763a3d535298d9bd01 /lib/rubygems/command.rb
parentb8984370daaff4809b04330a6d7098f171568f79 (diff)
[rubygems/rubygems] Replace domain parameter in Gem::Command#show_lookup_failure with a parameter to suppress suggestions
https://github.com/rubygems/rubygems/commit/760b7d834f
Diffstat (limited to 'lib/rubygems/command.rb')
-rw-r--r--lib/rubygems/command.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index 347b36cae6..ab683f0049 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -155,9 +155,8 @@ class Gem::Command
##
# Display to the user that a gem couldn't be found and reasons why
#--
- # TODO: replace +domain+ with a parameter to suppress suggestions
- def show_lookup_failure(gem_name, version, errors, domain, required_by = nil)
+ def show_lookup_failure(gem_name, version, errors, suppress_suggestions = false, required_by = nil)
gem = "'#{gem_name}' (#{version})"
msg = String.new "Could not find a valid gem #{gem}"
@@ -174,7 +173,7 @@ class Gem::Command
alert_error msg
- unless domain == :local # HACK
+ unless suppress_suggestions
suggestions = Gem::SpecFetcher.fetcher.suggest_gems_from_name gem_name
unless suggestions.empty?