From e168963d8ac8172941976255b653dc53044c3f0b Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 26 Jan 2018 13:27:56 +0000 Subject: vcs.rb: debug print in system method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/vcs.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tool') diff --git a/tool/vcs.rb b/tool/vcs.rb index c3a5b3a0f8..629d521320 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -86,6 +86,14 @@ else super end end + refine Kernel do + def system(*args, exception: true, **opts) + STDERR.puts [*args, **opts].inspect if $DEBUG + ret = super(*args, **opts, exception: exception) + raise "Command failed with status (#$?): #{args[0]}" if exception and !ret + ret + end + end ensure $VERBOSE = verbose unless verbose.nil? end -- cgit v1.2.3