1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Exit with non-zero status on disabled gem system update.

This commit is contained in:
Josef Šimánek 2020-06-15 00:28:25 +02:00 committed by Hiroshi SHIBATA
parent 3ab1cfc325
commit 7a571103f2
Notes: git 2020-06-15 21:21:01 +09:00
2 changed files with 5 additions and 3 deletions

View file

@ -264,7 +264,7 @@ command to remove old versions.
def update_rubygems
if Gem.disable_system_update_message
alert_error Gem.disable_system_update_message
return
terminate_interaction 1
end
check_update_arguments

View file

@ -245,8 +245,10 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
@cmd.options[:args] = []
@cmd.options[:system] = true
use_ui @ui do
@cmd.execute
assert_raises Gem::MockGemUi::TermError do
use_ui @ui do
@cmd.execute
end
end
assert_empty @ui.output