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:
parent
5ce70a0831
commit
a24ccfe6af
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user