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:
parent
27db7101c6
commit
17d8433d27
@ -93,7 +93,10 @@ else
|
|||||||
module DebugSystem
|
module DebugSystem
|
||||||
def system(*args, exception: true, **opts)
|
def system(*args, exception: true, **opts)
|
||||||
STDERR.puts [*args, **opts].inspect if $DEBUG
|
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
|
raise "Command failed with status (#$?): #{args[0]}" if exception and !ret
|
||||||
ret
|
ret
|
||||||
end
|
end
|
||||||
@ -104,6 +107,7 @@ else
|
|||||||
end
|
end
|
||||||
|
|
||||||
class VCS
|
class VCS
|
||||||
|
prepend(DebugSystem) if defined?(DebugSystem)
|
||||||
class NotFoundError < RuntimeError; end
|
class NotFoundError < RuntimeError; end
|
||||||
|
|
||||||
@@dirs = []
|
@@dirs = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user