summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 13:27:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 13:27:56 +0000
commite168963d8ac8172941976255b653dc53044c3f0b (patch)
tree709abe426d34934c41cba88b1170613c1d38ecde /tool
parentc30aed0817f86fcd911cdd36a00ffab906cb4843 (diff)
vcs.rb: debug print in system method
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/vcs.rb8
1 files changed, 8 insertions, 0 deletions
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