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

vcs.rb: fix errors

* tool/vcs.rb (DebugSystem#system): fix undefined local variable
  error.  as system doesn't accept `exception:` option before 2.6,
  remove it from `opts`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-30 02:20:02 +00:00
parent 5ce70a0831
commit a24ccfe6af

View file

@ -94,7 +94,9 @@ else
def system(*args, **opts)
STDERR.puts [*args, **opts].inspect if $DEBUG
if RUBY_VERSION >= "2.6"
opts[:exception] = true unless opts.key?(:exception)
exception = opts.fetch(:exception) {opts[:exception] = true}
else
exception = opts.delete(:exception) {true}
end
ret = super(*args, **opts)
raise "Command failed with status (#$?): #{args[0]}" if exception and !ret