diff options
author | bronzdoc <[email protected]> | 2019-07-25 23:54:06 -0600 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2019-08-17 07:35:48 +0900 |
commit | 89ad5df979727ab50eee6106550bf58b1888486e () | |
tree | 4b5d80d208686fc25deb39763a3d535298d9bd01 /lib/rubygems | |
parent | b8984370daaff4809b04330a6d7098f171568f79 (diff) |
[rubygems/rubygems] Replace domain parameter in Gem::Command#show_lookup_failure with a parameter to suppress suggestions
https://.com/rubygems/rubygems/commit/760b7d834f
-rw-r--r-- | lib/rubygems/command.rb | 5 | ||||
-rw-r--r-- | lib/rubygems/commands/install_command.rb | 5 |
2 files changed, 5 insertions, 5 deletions
@@ -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) 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 suggestions = Gem::SpecFetcher.fetcher.suggest_gems_from_name gem_name unless suggestions.empty? @@ -218,6 +218,7 @@ You can use `i` command instead of `install`. gem_version ||= options[:version] domain = options[:domain] domain = :local unless options[:suggest_alternate] begin install_gem gem_name, gem_version @@ -225,11 +226,11 @@ You can use `i` command instead of `install`. alert_error "Error installing #{gem_name}:\n\t#{e.message}" exit_code |= 1 rescue Gem::GemNotFoundException => e - show_lookup_failure e.name, e.version, e.errors, domain exit_code |= 2 rescue Gem::UnsatisfiableDependencyError => e - show_lookup_failure e.name, e.version, e.errors, domain, "'#{gem_name}' (#{gem_version})" exit_code |= 2 |