Merge rubygems/bundler HEAD.

Pick from dfbb5a3811
This commit is contained in:
Hiroshi SHIBATA 2022-08-09 11:16:07 +09:00
parent f8936b3341
commit 44264b4fee
Notes: git 2022-08-09 12:05:48 +09:00
80 changed files with 312 additions and 286 deletions

View file

@ -96,7 +96,7 @@ class Gem::Commands::UninstallCommand < Gem::Command
def defaults_str # :nodoc:
"--version '#{Gem::Requirement.default}' --no-force " +
"--user-install"
"--user-install"
end
def description # :nodoc:
@ -114,8 +114,8 @@ that is a dependency of an existing gem. You can use the
end
def check_version # :nodoc:
if options[:version] != Gem::Requirement.default and
get_all_gem_names.size > 1
if options[:version] != Gem::Requirement.default &&
get_all_gem_names.size > 1
alert_error "Can't use --version with multiple gems. You can specify multiple gems with" \
" version requirements using `gem uninstall 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
terminate_interaction 1
@ -125,7 +125,7 @@ that is a dependency of an existing gem. You can use the
def execute
check_version
if options[:all] and not options[:args].empty?
if options[:all] && !options[:args].empty?
uninstall_specific
elsif options[:all]
uninstall_all