diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-26 13:27:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-26 13:27:56 +0000 |
commit | e168963d8ac8172941976255b653dc53044c3f0b (patch) | |
tree | 709abe426d34934c41cba88b1170613c1d38ecde | |
parent | c30aed0817f86fcd911cdd36a00ffab906cb4843 (diff) | |
download | ruby-e168963d8ac8172941976255b653dc53044c3f0b.tar.gz |
vcs.rb: debug print in system method
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | tool/vcs.rb | 8 |
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 |