summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/uninstall_command.rb
diff options
context:
space:
mode:
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
-