Make Gem::SystemExitException properly exit with a given code

The cause was in how Gem::SystemExitException initializes itself.  It
didn't pass an exit code to the super method.  See the document of
SystemExit.new() for details.
This commit is contained in:
Akinori MUSHA 2020-10-22 03:46:18 +09:00 committed by Hiroshi SHIBATA
parent 6b74996810
commit 388c4e1076
Notes: git 2022-07-22 12:06:29 +09:00

View File

@ -7,12 +7,7 @@
require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'
args = ARGV.clone
begin
Gem::GemRunner.new.run args
rescue Gem::SystemExitException => e
exit e.exit_code
end
Gem::GemRunner.new.run args