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

vcs.rb: prepend DebugSystem to VCS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-27 06:11:23 +00:00
parent 27db7101c6
commit 17d8433d27

View file

@ -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 = []