mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RubyGems 1.1.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dc8359969e
commit
8cc45aae94
82 changed files with 5776 additions and 2928 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue