From 17d8433d276ecc041376e67fea5430df7e97fb21 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 27 Jan 2018 06:11:23 +0000 Subject: vcs.rb: prepend DebugSystem to VCS git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/vcs.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tool/vcs.rb') diff --git a/tool/vcs.rb b/tool/vcs.rb index 7bbc50b4b2..9df3b38302 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -93,7 +93,10 @@ else module DebugSystem def system(*args, exception: true, **opts) STDERR.puts [*args, **opts].inspect if $DEBUG - ret = super(*args, **opts, exception: exception) + if RUBY_VERSION >= "2.6" + opts[:exception] = exception + end + ret = super(*args, **opts) raise "Command failed with status (#$?): #{args[0]}" if exception and !ret ret end @@ -104,6 +107,7 @@ else end class VCS + prepend(DebugSystem) if defined?(DebugSystem) class NotFoundError < RuntimeError; end @@dirs = [] -- cgit v1.2.3