Permalink
Browse files

Added debugging output if $DEBUG is set.

  • Loading branch information...
1 parent c694878 commit 80e8d62e0ee8cbde34577cec78d2ad7e7a8f6181 @postmodern committed Feb 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/scm/util.rb
View
4 lib/scm/util.rb
@@ -23,6 +23,8 @@ def run(program,*arguments)
# filter out empty Strings
arguments.reject!(&:empty?)
+ $stderr.puts(program,*arguments) if $DEBUG
+
system(program.to_s,*arguments)
end
@@ -53,6 +55,8 @@ def popen(command,*arguments)
end
end
+ $stderr.puts(command) if $DEBUG
+
io = IO.popen(command)
if block_given?

0 comments on commit 80e8d62

Please sign in to comment.