aboutsummaryrefslogtreecommitdiffstats
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 06:11:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 06:11:23 +0000
commit17d8433d276ecc041376e67fea5430df7e97fb21 (patch)
tree9e38fe963733d4d3dc5b6c3b4a11faa0fea7575e /tool/vcs.rb
parent27db7101c65a7b00028de227f2743106b33c3c83 (diff)
downloadruby-17d8433d276ecc041376e67fea5430df7e97fb21.tar.gz
vcs.rb: prepend DebugSystem to VCS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb6
1 files changed, 5 insertions, 1 deletions
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 = []