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:
parent
3ab1cfc325
commit
7a571103f2
Notes:
git
2020-06-15 21:21:01 +09:00
2 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue