summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rw-r--r--tool/vcs.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index a7cfa08d52..7bbc50b4b2 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -86,18 +86,21 @@ 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
using DebugPOpen
+ module DebugSystem
+ 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
+ module Kernel
+ prepend(DebugSystem)
+ end
end
class VCS