ruby-changes:61728
From: Josef <ko1@a...>
Date: Mon, 15 Jun 2020 21:21:03 +0900 (JST)
Subject: [ruby-changes:61728] 7a571103f2 (master): Exit with non-zero status on disabled gem system update.
https://git.ruby-lang.org/ruby.git/commit/?id=7a571103f2 From 7a571103f231e8f9e7200aa40b9a56c3f34a2e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= <josef.simanek@g...> Date: Mon, 15 Jun 2020 00:28:25 +0200 Subject: Exit with non-zero status on disabled gem system update. diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index 052d9f9..612667d 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -264,7 +264,7 @@ command to remove old versions. https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/update_command.rb#L264 def update_rubygems if Gem.disable_system_update_message alert_error Gem.disable_system_update_message - return + terminate_interaction 1 end check_update_arguments diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb index 3b823a0..bd06c84 100644 --- a/test/rubygems/test_gem_commands_update_command.rb +++ b/test/rubygems/test_gem_commands_update_command.rb @@ -245,8 +245,10 @@ class TestGemCommandsUpdateCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_update_command.rb#L245 @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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/