diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 22:40:06 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 22:40:06 +0000 |
commit | 8cc45aae947d453acca029e13eb64f3f5f0bf942 (patch) | |
tree | f9485a20c99defe1aae3f32555a41d23c2298ad8 /lib/rubygems/commands/uninstall_command.rb | |
parent | dc8359969ec71ece10357ba9396430db7f029e45 (diff) | |
download | ruby-8cc45aae947d453acca029e13eb64f3f5f0bf942.tar.gz |
Import RubyGems 1.1.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/uninstall_command.rb')
-rw-r--r-- | lib/rubygems/commands/uninstall_command.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/rubygems/commands/uninstall_command.rb b/lib/rubygems/commands/uninstall_command.rb index 2d9c46ee52..3d6e2383bc 100644 --- a/lib/rubygems/commands/uninstall_command.rb +++ b/lib/rubygems/commands/uninstall_command.rb @@ -35,6 +35,11 @@ module Gem options[:install_dir] = File.expand_path(value) end + add_option('-n', '--bindir DIR', + 'Directory to remove binaries from') do |value, options| + options[:bin_dir] = File.expand_path(value) + end + add_version_option add_platform_option end @@ -54,7 +59,13 @@ module Gem def execute get_all_gem_names.each do |gem_name| - Gem::Uninstaller.new(gem_name, options).uninstall + begin + Gem::Uninstaller.new(gem_name, options).uninstall + rescue Gem::GemNotInHomeException => e + spec = e.spec + alert("In order to remove #{spec.name}, please execute:\n" \ + "\tgem uninstall #{spec.name} --install-dir=#{spec.installation_path}") + end end end end |