mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
Merge RubyGems-3.3.20 and Bundler-2.3.20
This commit is contained in:
parent
44c926f3a9
commit
522b75f1b6
135 changed files with 1131 additions and 613 deletions
|
@ -46,8 +46,8 @@ class Gem::Commands::InstallCommand < Gem::Command
|
|||
|
||||
def defaults_str # :nodoc:
|
||||
"--both --version '#{Gem::Requirement.default}' --no-force\n" +
|
||||
"--install-dir #{Gem.dir} --lock\n" +
|
||||
install_update_defaults_str
|
||||
"--install-dir #{Gem.dir} --lock\n" +
|
||||
install_update_defaults_str
|
||||
end
|
||||
|
||||
def description # :nodoc:
|
||||
|
@ -134,15 +134,15 @@ You can use `i` command instead of `install`.
|
|||
end
|
||||
|
||||
def check_install_dir # :nodoc:
|
||||
if options[:install_dir] and options[:user_install]
|
||||
if options[:install_dir] && options[:user_install]
|
||||
alert_error "Use --install-dir or --user-install but not both"
|
||||
terminate_interaction 1
|
||||
end
|
||||
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 install 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'`"
|
||||
terminate_interaction 1
|
||||
|
@ -191,8 +191,8 @@ You can use `i` command instead of `install`.
|
|||
end
|
||||
|
||||
def install_gem(name, version) # :nodoc:
|
||||
return if options[:conservative] and
|
||||
not Gem::Dependency.new(name, version).matching_specs.empty?
|
||||
return if options[:conservative] &&
|
||||
!Gem::Dependency.new(name, version).matching_specs.empty?
|
||||
|
||||
req = Gem::Requirement.create(version)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue