summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2020-06-14 00:26:23 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-15 21:20:37 +0900
commit3ab1cfc325811b862cb81d0360bf83216cd6f235 (patch)
treed2a28c09fa9c70fbba90a9cd62cde5fa10629305 /lib/rubygems/commands
parent49c42b6012264890bedb572e5e0c6fc4750aaf9a (diff)
Add Gem.disable_system_update_message to disable gem update --system if needed.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3229
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/update_command.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index ca407ee33e..052d9f9245 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -262,6 +262,11 @@ command to remove old versions.
# Update RubyGems software to the latest version.
def update_rubygems
+ if Gem.disable_system_update_message
+ alert_error Gem.disable_system_update_message
+ return
+ end
+
check_update_arguments
version, requirement = rubygems_target_version