aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/commands/uninstall_command.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
commitc00e84327f14845bd484e76b5ee5dfeb1fa9ce3d (patch)
tree9f558dafa363f4f0118d504a50cd4461e2821cd1 /lib/rubygems/commands/uninstall_command.rb
parent6b05153a3a75b74b64553d6a46f501d9ee0f0376 (diff)
downloadruby-c00e84327f14845bd484e76b5ee5dfeb1fa9ce3d.tar.gz
Merge rubygems master.
This is RC version of Rubygems 2.7.0. https://github.com/rubygems/rubygems/commit/688fb7e83c13c3fe7c2bb03c49a2db4c82852aee git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/uninstall_command.rb')
-rw-r--r--lib/rubygems/commands/uninstall_command.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rubygems/commands/uninstall_command.rb b/lib/rubygems/commands/uninstall_command.rb
index fe97790194..20b3a7a1e4 100644
--- a/lib/rubygems/commands/uninstall_command.rb
+++ b/lib/rubygems/commands/uninstall_command.rb
@@ -30,7 +30,7 @@ class Gem::Commands::UninstallCommand < Gem::Command
options[:ignore] = value
end
- add_option('-D', '--[no-]-check-development',
+ add_option('-D', '--[no-]check-development',
'Check development dependencies while uninstalling',
'(default: false)') do |value, options|
options[:check_dev] = value
@@ -143,7 +143,9 @@ that is a dependency of an existing gem. You can use the
deplist = Gem::DependencyList.new
get_all_gem_names.uniq.each do |name|
- Gem::Specification.find_all_by_name(name).each do |spec|
+ gem_specs = Gem::Specification.find_all_by_name(name)
+ say("Gem '#{name}' is not installed") if gem_specs.empty?
+ gem_specs.each do |spec|
deplist.add spec
end
end
@@ -162,4 +164,3 @@ that is a dependency of an existing gem. You can use the
end
end
-